Quellcode durchsuchen

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

Guillem Jover vor 17 Jahren
Ursprung
Commit
848980ebb1
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  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. */
   if (control_file) {
-    for (const char *c = "/."; *c; c++)
+    const char *c;
+
+    for (c = "/."; *c; c++)
       if (strchr(control_file, *c))
         badusage(_("control file contains %c"), *c);
   }