]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
squelch a Windows VS warning about null termination on the ZID
authorTravis Cross <tc@traviscross.com>
Thu, 17 May 2012 06:13:32 +0000 (06:13 +0000)
committerTravis Cross <tc@traviscross.com>
Thu, 17 May 2012 06:13:32 +0000 (06:13 +0000)
According Jeff Lenk, Windows Visual Studio doesn't understand that
people use the char type for non-null-terminated byte arrays, so it
throws a warning about this that causes the build to fail on Windows.

As the initial value for the ZID doesn't really matter here one iota,
just null-terminate it on Windows.

src/switch_rtp.c

index 9c42520ff9cf9f656755b39f7bf1452cc7c7322a..c4030148aa0ebd1816a1b67abc8bef5b9ff687fb 100644 (file)
@@ -73,7 +73,11 @@ typedef srtp_hdr_t rtp_hdr_t;
 #ifdef ENABLE_ZRTP
 #include "zrtp.h"
 static zrtp_global_t *zrtp_global;
+#ifndef WIN32
 static zrtp_zid_t zid = { "FreeSWITCH01" };
+#else
+static zrtp_zid_t zid = { "FreeSWITCH0\0" };
+#endif
 static int zrtp_on = 0;
 #define ZRTP_MITM_TRIES 100
 #endif