diff options
| author | Roy Marples <roy@marples.name> | 2015-12-21 11:07:32 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2015-12-21 11:07:32 +0000 |
| commit | a96ef5defcc79c94781d1d12db5f1a575196e6de (patch) | |
| tree | e902c798b9f180cd0776b44b382d5e26091d249d /dhcpcd.c | |
| parent | 9820ccc8a32d07fd7e6a6daf939b2d07f7323040 (diff) | |
| download | dhcpcd-a96ef5defcc79c94781d1d12db5f1a575196e6de.tar.xz | |
Fix a bogus gcc warning about a potential signed overflow.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) |
