]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
Avoid "optarg" as an identifier
authorMartin Mares <mj@ucw.cz>
Sat, 17 Mar 2018 11:41:24 +0000 (12:41 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 17 Mar 2018 11:41:24 +0000 (12:41 +0100)
On SylixOS, it is defined as a macro.

common.c
pciutils.h

index 9cd72bee122dacc6b13248215c0f225bbd7413b3..c5a3c8f2ec1349983fcd3c41867812af2fe3a25c 100644 (file)
--- a/common.c
+++ b/common.c
@@ -99,34 +99,34 @@ set_pci_option(struct pci_access *pacc, char *arg)
 }
 
 int
-parse_generic_option(int i, struct pci_access *pacc, char *optarg)
+parse_generic_option(int i, struct pci_access *pacc, char *arg)
 {
   switch (i)
     {
 #ifdef PCI_HAVE_PM_INTEL_CONF
     case 'H':
-      if (!strcmp(optarg, "1"))
+      if (!strcmp(arg, "1"))
        pacc->method = PCI_ACCESS_I386_TYPE1;
-      else if (!strcmp(optarg, "2"))
+      else if (!strcmp(arg, "2"))
        pacc->method = PCI_ACCESS_I386_TYPE2;
       else
-       die("Unknown hardware configuration type %s", optarg);
+       die("Unknown hardware configuration type %s", arg);
       break;
 #endif
 #ifdef PCI_HAVE_PM_DUMP
     case 'F':
-      pci_set_param(pacc, "dump.name", optarg);
+      pci_set_param(pacc, "dump.name", arg);
       pacc->method = PCI_ACCESS_DUMP;
       break;
 #endif
     case 'A':
-      set_pci_method(pacc, optarg);
+      set_pci_method(pacc, arg);
       break;
     case 'G':
       pacc->debugging++;
       break;
     case 'O':
-      set_pci_option(pacc, optarg);
+      set_pci_option(pacc, arg);
       break;
     default:
       return 0;
index 1de2b01fcd7315faf367d967d0995c785a6c37a2..3c5fac616479c95e73f5e89156539afcc2b1262b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     The PCI Utilities -- Declarations
  *
- *     Copyright (c) 1997--2016 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2018 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
@@ -23,7 +23,7 @@ void die(char *msg, ...) NONRET PCI_PRINTF(1,2);
 void *xmalloc(size_t howmuch);
 void *xrealloc(void *ptr, size_t howmuch);
 char *xstrdup(const char *str);
-int parse_generic_option(int i, struct pci_access *pacc, char *optarg);
+int parse_generic_option(int i, struct pci_access *pacc, char *arg);
 
 #ifdef PCI_HAVE_PM_INTEL_CONF
 #define GENOPT_INTEL "H:"