chiark / gitweb /
prlimit.c: Fix format-string type mismatch.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 19 Jan 2014 01:33:27 +0000 (01:33 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 19 Jan 2014 01:37:46 +0000 (01:37 +0000)
Mismatch between `size_t' variable and `int' expected argument.
Obviously `size_t' is more sensible here...

prlimit.c

index a871cdd210833c92a485f2a668d5be263aeaa2c1..b7d6df1852968ca5bbbc38abd1497365007d09b6 100644 (file)
--- a/prlimit.c
+++ b/prlimit.c
@@ -175,7 +175,7 @@ static const struct limittab *findlimit(const char *p, size_t n)
     if (strncmp(lt->name, p, n) == 0 && !lt->name[n])
       return (lt);
   }
-  die(EXIT_FAILURE, "unknown resource limit `%.*s'\n", n, p);
+  die(EXIT_FAILURE, "unknown resource limit `%.*s'\n", (int)n, p);
   return (0);
 }