diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-03-03 23:21:28 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-03-03 23:21:28 +0100 |
commit | 38ea955f605d954a9671e539113b9db42dc1160c (patch) | |
tree | 39b0868418758c3314723883a5bda48a00e5c3c6 /common/eurephia_nullsafe.h | |
parent | e684b799e08954ed954cd9584bf1f6ae649e151b (diff) | |
download | eurephia-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.h | 2 |
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_ */ |