Don't do assignments within conditional expression.
MSVC warns about that with /Wall.
diff --git a/rpcapd/fileconf.c b/rpcapd/fileconf.c
index 20de520..a1ae215 100755
--- a/rpcapd/fileconf.c
+++ b/rpcapd/fileconf.c
@@ -74,7 +74,8 @@
if (line[0] == '\r') continue; // Blank line
if (line[0] == '#') continue; // Comment
- if ((ptr = strstr(line, "ActiveClient")))
+ ptr = strstr(line, "ActiveClient");
+ if (ptr)
{
char *address, *port;
char *lasts;
@@ -102,7 +103,8 @@
continue;
}
- if ((ptr = strstr(line, "PassiveClient")))
+ ptr = strstr(line, "PassiveClient");
+ if (ptr)
{
ptr = strchr(ptr, '=') + 1;
strlcat(hostlist, ptr, MAX_HOST_LIST);
@@ -110,7 +112,8 @@
continue;
}
- if ((ptr = strstr(line, "NullAuthPermit")))
+ ptr = strstr(line, "NullAuthPermit");
+ if (ptr)
{
ptr = strstr(ptr, "YES");
if (ptr)