Message ID | a4f5a2d5-11fa-fef6-23bf-c1b7e0add520@inlv.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Herbert Xu |
Headers | show |
Op 06-03-18 om 14:49 schreef Martijn Dekker: > The original reporter, Michael Greenberg, didn't specify the bug only > occurs on macOS and FreeBSD but it does seem to be the same bug. > > He submitted a different patch to fix it: [snip] > Which is better? That other patch only fixes it for the unset case, not for the empty case, so I think the recent one is better. - M. -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Martijn Dekker <martijn@inlv.org> wrote: > Op 06-03-18 om 14:49 schreef Martijn Dekker: >> The original reporter, Michael Greenberg, didn't specify the bug only >> occurs on macOS and FreeBSD but it does seem to be the same bug. >> >> He submitted a different patch to fix it: > [snip] >> Which is better? > > That other patch only fixes it for the unset case, not for the empty > case, so I think the recent one is better. Yes, yours is better but please resend it with the ERANGE change as suggested. Thanks,
diff --git a/src/var.c b/src/var.c index cc6f7f2..e34f9cf 100644 --- a/src/var.c +++ b/src/var.c @@ -353,7 +353,7 @@ lookupvar(const char *name) intmax_t lookupvarint(const char *name) { - return atomax(lookupvar(name) ?: nullstr, 0); + return atomax(lookupvar(name) ?: "0", 0); } Which is better?