summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2015-12-21 11:07:32 +0000
committerRoy Marples <roy@marples.name>2015-12-21 11:07:32 +0000
commita96ef5defcc79c94781d1d12db5f1a575196e6de (patch)
treee902c798b9f180cd0776b44b382d5e26091d249d /dhcpcd.c
parent9820ccc8a32d07fd7e6a6daf939b2d07f7323040 (diff)
downloaddhcpcd-a96ef5defcc79c94781d1d12db5f1a575196e6de.tar.xz
Fix a bogus gcc warning about a potential signed overflow.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 6ba4ace9..529188ad 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1693,8 +1693,11 @@ main(int argc, char **argv)
}
#ifdef USE_SIGNALS
- if (!(ctx.options & DHCPCD_TEST) &&
- (sig == 0 || i == 4 || ctx.ifc != 0))
+ /* Test against siga instead of sig to avoid gcc
+ * warning about a bogus potential signed overflow.
+ * The end result will be the same. */
+ if ((siga == NULL || i == 4 || ctx.ifc != 0) &&
+ !(ctx.options & DHCPCD_TEST))
{
#endif
if (ctx.options & DHCPCD_MASTER)