]> mj.ucw.cz Git - pciutils.git/commitdiff
Be ISO C89 compliant (still needed for MSVC)
authorMartin Mares <mj@ucw.cz>
Sat, 4 Dec 2010 17:47:46 +0000 (18:47 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 4 Dec 2010 17:47:46 +0000 (18:47 +0100)
setpci.c

index 97740e8c2168c0c3f534b57571a7501a8f15c49c..5711e5105a9d49ab107c1cff3d82140d0da8f054 100644 (file)
--- a/setpci.c
+++ b/setpci.c
@@ -482,11 +482,12 @@ static const struct reg_name *parse_reg_name(char *name)
 static int parse_x32(char *c, char **stopp, unsigned int *resp)
 {
   char *stop;
+  unsigned long int l;
 
   if (!*c)
     return -1;
   errno = 0;
-  unsigned long int l = strtoul(c, &stop, 16);
+  l = strtoul(c, &stop, 16);
   if (errno)
     return -1;
   if ((l & ~0U) != l)