Constify bsd_getopt(3) arguments

This matches the standard declaration for getopt(3).
This commit is contained in:
Guillem Jover 2011-06-08 02:10:38 +02:00
parent 7446f029b5
commit 4a6303ba3b
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ extern int optreset;
#define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr) #define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr)
#endif #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); mode_t getmode(const void *set, mode_t mode);
void *setmode(const char *mode_str); void *setmode(const char *mode_str);

View File

@ -29,7 +29,7 @@
int optreset = 0; int optreset = 0;
int int
bsd_getopt(int argc, char **argv, char *shortopts) bsd_getopt(int argc, char * const argv[], const char *shortopts)
{ {
if (optreset == 1) { if (optreset == 1) {
optreset = 0; optreset = 0;