[babl] babl-internal: tidy up some log messages
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl-internal: tidy up some log messages
- Date: Tue, 13 Jun 2017 07:26:53 +0000 (UTC)
commit ee39899560a6a389c5549c03d91292456fdb5a80
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Jun 13 09:23:43 2017 +0200
babl-internal: tidy up some log messages
babl/babl-internal.h | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/babl/babl-internal.h b/babl/babl-internal.h
index 42262d6..b55249b 100644
--- a/babl/babl-internal.h
+++ b/babl/babl-internal.h
@@ -265,22 +265,18 @@ BABL_CLASS_MINIMAL_IMPLEMENT(klass) \
const Babl * \
babl_##klass (const char *name) \
{ \
- Babl *babl = NULL; \
+ Babl *babl; \
\
if (babl_hmpf_on_name_lookups) \
{ \
- babl_log ("%s(\"%s\"): hmpf!", G_STRFUNC, name); \
+ babl_log ("%s(\"%s\"): looking up", G_STRFUNC, name); \
} \
+ if (!db) \
+ { \
+ babl_fatal ("%s(\"%s\"): you must call babl_init first", G_STRFUNC, name); \
+ } \
+ babl = babl_db_exist_by_name (db, name); \
\
- if( db != NULL ) \
- { \
- babl = babl_db_exist_by_name (db, name); \
- } \
- else{ \
- babl_fatal("You must call babl_init() first"); \
- } \
- \
- \
if (!babl) \
{ \
babl_fatal ("%s(\"%s\"): not found", G_STRFUNC, name); \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]