]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11405 #resolve tweak macro to use do while 0
authorSeven Du <dujinfang@gmail.com>
Sun, 23 Sep 2018 00:59:30 +0000 (08:59 +0800)
committerMike Jerris <mike@jerris.com>
Mon, 24 Sep 2018 18:52:07 +0000 (18:52 +0000)
the original one will leave an extra semicolon after }

src/include/switch_ivr.h

index 1ebd7a0e13dc38a7fabe25f4f09dc8c6bc3ff8bd..3525ab28ff92267cbeff1691619ceee3daf1e037 100644 (file)
@@ -66,11 +66,11 @@ SWITCH_BEGIN_EXTERN_C struct switch_unicast_conninfo {
 typedef struct switch_unicast_conninfo switch_unicast_conninfo_t;
 
 #define SWITCH_IVR_VERIFY_SILENCE_DIVISOR(divisor) \
-       { \
+       do { \
                if ((divisor) <= 0 && (divisor) != -1) { \
                        divisor = 400; \
                } \
-       }
+       } while (0)
 
 /**
  * @defgroup switch_ivr IVR Library