Explorar o código

dpkg: Use ohshit() instead of ohshite() on strtoul() error

There's no guarantee that errno will be set for all error conditions
checked.

Regression introduced in commit 20e7af7b6ee4ab703b5d0e6f091fe3f565550a2b.
Guillem Jover %!s(int64=14) %!d(string=hai) anos
pai
achega
a740846d61
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/main.c

+ 1 - 1
src/main.c

@@ -731,7 +731,7 @@ commandfd(const char *const *argv)
   errno = 0;
   errno = 0;
   infd = strtoul(pipein, &endptr, 10);
   infd = strtoul(pipein, &endptr, 10);
   if (pipein == endptr || *endptr || infd > INT_MAX)
   if (pipein == endptr || *endptr || infd > INT_MAX)
-    ohshite(_("invalid integer for --%s: `%.250s'"), cipaction->olong, pipein);
+    ohshit(_("invalid integer for --%s: `%.250s'"), cipaction->olong, pipein);
   if ((in= fdopen(infd, "r")) == NULL)
   if ((in= fdopen(infd, "r")) == NULL)
     ohshite(_("couldn't open `%i' for stream"), (int) infd);
     ohshite(_("couldn't open `%i' for stream"), (int) infd);