summaryrefslogtreecommitdiffstats
path: root/common/eurephia_nullsafe.h
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-03-03 23:21:28 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-03-03 23:21:28 +0100
commit38ea955f605d954a9671e539113b9db42dc1160c (patch)
tree39b0868418758c3314723883a5bda48a00e5c3c6 /common/eurephia_nullsafe.h
parente684b799e08954ed954cd9584bf1f6ae649e151b (diff)
downloadeurephia-38ea955f605d954a9671e539113b9db42dc1160c.tar.gz
eurephia-38ea955f605d954a9671e539113b9db42dc1160c.tar.xz
eurephia-38ea955f605d954a9671e539113b9db42dc1160c.zip
Added macro for defaultIntvalue() for pure integer values
Diffstat (limited to 'common/eurephia_nullsafe.h')
-rw-r--r--common/eurephia_nullsafe.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/eurephia_nullsafe.h b/common/eurephia_nullsafe.h
index 80709ee..26b598c 100644
--- a/common/eurephia_nullsafe.h
+++ b/common/eurephia_nullsafe.h
@@ -30,5 +30,5 @@
#define strlen_nullsafe(str) (str != NULL ? strlen(str) : 0)
#define free_nullsafe(str) if( str != NULL ) { free(str); str = NULL;}
#define defaultValue(str, defstr) (strlen_nullsafe(str) == 0 ? defstr : str)
-
+#define defaultIntValue(ival, defval) (ival == 0 ? defval : ival)
#endif /* !EUREPHIA_NULLSAFE_H_ */