index of long options is not used.
+2011-10-30 Nicolas François <nicolas.francois@centraliens.net>
+
+ * src/faillog.c, src/chage.c, src/newusers.c, src/su.c: The getopt
+ index of long options is not used.
+
2011-10-29 Nicolas François <nicolas.francois@centraliens.net>
* lib/prototypes.h, libmisc/Makefile.am, libmisc/root_flag.c,
/*
* Parse the command line options.
*/
- int option_index = 0;
int c;
static struct option long_options[] = {
{"lastday", required_argument, NULL, 'd'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
- getopt_long (argc, argv, "d:E:hI:lm:M:W:", long_options,
- &option_index)) != -1) {
+ while ((c = getopt_long (argc, argv, "d:E:hI:lm:M:W:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'd':
dflg = true;
(void) textdomain (PACKAGE);
{
- int option_index = 0;
int c;
static struct option long_options[] = {
{"all", no_argument, NULL, 'a'},
{NULL, 0, NULL, '\0'}
};
while ((c = getopt_long (argc, argv, "ahl:m:rt:u:",
- long_options, &option_index)) != -1) {
+ long_options, NULL)) != -1) {
switch (c) {
case 'a':
aflg = true;
*/
static void process_flags (int argc, char **argv)
{
- int option_index = 0;
int c;
static struct option long_options[] = {
#ifndef USE_PAM
#else /* USE_PAM */
"hr",
#endif
- long_options, &option_index)) != -1) {
+ long_options, NULL)) != -1) {
switch (c) {
case 'h':
usage (EXIT_SUCCESS);
*/
static void process_flags (int argc, char **argv)
{
- int option_index = 0;
int c;
static struct option long_options[] = {
{"command", required_argument, NULL, 'c'},
{NULL, 0, NULL, '\0'}
};
- while ((c = getopt_long (argc, argv, "c:hlmps:", long_options,
- &option_index)) != -1) {
+ while ((c = getopt_long (argc, argv, "c:hlmps:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'c':
command = optarg;