]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Constify bsd_getopt(3) arguments
authorGuillem Jover <guillem@hadrons.org>
Wed, 8 Jun 2011 00:10:38 +0000 (02:10 +0200)
committerGuillem Jover <guillem@hadrons.org>
Wed, 8 Jun 2011 00:10:38 +0000 (02:10 +0200)
This matches the standard declaration for getopt(3).

include/bsd/unistd.h
src/bsd_getopt.c

index 1c4e579a1f5bafac376c5890c11e60c18f3415a1..edb0ec59a593d0ade3120f1bec0f1955dbff46f0 100644 (file)
@@ -49,7 +49,7 @@ extern int optreset;
 #define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr)
 #endif
 
-int bsd_getopt(int, char **, char *);
+int bsd_getopt(int argc, char * const argv[], const char *shortopts)
 
 mode_t getmode(const void *set, mode_t mode);
 void *setmode(const char *mode_str);
index 3e89817af436e069a2b0850be1f13affb7f6285c..b5bd270511cff2e6d79804b866b2f87e3c33b4ce 100644 (file)
@@ -29,7 +29,7 @@
 int optreset = 0;
 
 int
-bsd_getopt(int argc, char **argv, char *shortopts)
+bsd_getopt(int argc, char * const argv[], const char *shortopts)
 {
        if (optreset == 1) {
                optreset = 0;