strntoul() is supposed to return unsigned long, not int
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 30 Jun 2008 08:24:34 +0000 (11:24 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 30 Jun 2008 08:24:34 +0000 (11:24 +0300)
- the type mismatch busts up handling on largish files...

lib/cpio.c

index 92cdbc5..f45644b 100644 (file)
@@ -26,7 +26,7 @@
  * @param num          max no. of bytes to read
  * @return             converted integer
  */
-static int strntoul(const char *str,char **endptr, int base, size_t num)
+static unsigned long strntoul(const char *str,char **endptr, int base, size_t num)
 {
     char buf[num+1], * end;
     unsigned long ret;