]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix math.
authorRoy Marples <roy@marples.name>
Tue, 3 May 2016 12:12:15 +0000 (12:12 +0000)
committerRoy Marples <roy@marples.name>
Tue, 3 May 2016 12:12:15 +0000 (12:12 +0000)
script.c

index da781c7c7e840bd841cd0742d9fc019d427b6596..e20eca9cef94aef47a660caa0447e50056ec9fc9 100644 (file)
--- a/script.c
+++ b/script.c
@@ -691,7 +691,7 @@ script_runreason(const struct interface *ifp, const char *reason)
 
        /* Resize for PATH and RC_SVCNAME */
        svcname = getenv(RC_SVCNAME);
-       ep = reallocarray(env, elen + 2 + svcname ? 1 : 0, sizeof(char *));
+       ep = reallocarray(env, elen + 2 + (svcname ? 1 : 0), sizeof(char *));
        if (ep == NULL) {
                elen = 0;
                goto out;