Explorar o código

dpkg-query: Do not use C99 style for-loop variable declarations

Guillem Jover %!s(int64=17) %!d(string=hai) anos
pai
achega
848980ebb1
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/query.c

+ 3 - 1
src/query.c

@@ -534,7 +534,9 @@ control_path(const char *const *argv)
 
 
   /* Validate control file name for sanity. */
   /* Validate control file name for sanity. */
   if (control_file) {
   if (control_file) {
-    for (const char *c = "/."; *c; c++)
+    const char *c;
+
+    for (c = "/."; *c; c++)
       if (strchr(control_file, *c))
       if (strchr(control_file, *c))
         badusage(_("control file contains %c"), *c);
         badusage(_("control file contains %c"), *c);
   }
   }