From: Brian West Date: Sun, 31 Mar 2013 00:55:55 +0000 (-0500) Subject: missing zset X-Git-Tag: v1.2.8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f47c49590819743405f05892aee47508a86652e;p=thirdparty%2Ffreeswitch.git missing zset --- diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index f547df624a..11a4cdc38e 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -266,6 +266,10 @@ static inline switch_bool_t switch_is_moh(const char *s) return SWITCH_TRUE; } + +#define zset(_a, _b) if (!zstr(_b)) _a = _b + + /* find a character (find) in a string (in) and return a pointer to that point in the string where the character was found using the array (allowed) as allowed non-matching characters, when (allowed) is NULL, behaviour should be identical to strchr() */