Clear up some ambiguity with old style assignments.

-Erik
This commit is contained in:
Erik Andersen 2000-01-29 07:06:24 +00:00
parent a6d0dbc86f
commit 04e97024e7
11 changed files with 24 additions and 24 deletions

View File

@ -27,8 +27,8 @@
#include "internal.h"
static uid_t uid=-1;
static gid_t gid=-1;
static uid_t uid = -1;
static gid_t gid = -1;
static int whichApp;
static char* invocationName=NULL;
static char* theMode=NULL;
@ -92,7 +92,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
if (argc < 2)
usage( appUsage);
invocationName=*argv;
invocationName = *argv;
argc--;
argv++;
@ -111,7 +111,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
}
if ( whichApp == CHMOD_APP ) {
theMode=*argv;
theMode = *argv;
} else {
/* Find the selected group */

View File

@ -204,10 +204,10 @@ date_main(int argc, char * * argv)
}
} else {
if ( (date_fmt == NULL) && (strcmp(*argv, "+")==0) )
date_fmt=*argv;
date_fmt = *argv;
else if (date_str == NULL) {
set_time = 1;
date_str=*argv;
date_str = *argv;
} else {
usage ( date_usage);
}

4
date.c
View File

@ -204,10 +204,10 @@ date_main(int argc, char * * argv)
}
} else {
if ( (date_fmt == NULL) && (strcmp(*argv, "+")==0) )
date_fmt=*argv;
date_fmt = *argv;
else if (date_str == NULL) {
set_time = 1;
date_str=*argv;
date_str = *argv;
} else {
usage ( date_usage);
}

6
find.c
View File

@ -70,7 +70,7 @@ int find_main(int argc, char **argv)
argv++;
if ( argc > 0 && **argv != '-') {
directory=*argv;
directory = *argv;
argc--;
argv++;
}
@ -89,8 +89,8 @@ int find_main(int argc, char **argv)
case 'n':
if (strcmp(*argv, "name")==0) {
if (argc-- > 1) {
pattern=*(++argv);
stopit=-TRUE;
pattern = *(++argv);
stopit=TRUE;
} else {
usage (find_usage);
}

View File

@ -70,7 +70,7 @@ int find_main(int argc, char **argv)
argv++;
if ( argc > 0 && **argv != '-') {
directory=*argv;
directory = *argv;
argc--;
argv++;
}
@ -89,8 +89,8 @@ int find_main(int argc, char **argv)
case 'n':
if (strcmp(*argv, "name")==0) {
if (argc-- > 1) {
pattern=*(++argv);
stopit=-TRUE;
pattern = *(++argv);
stopit=TRUE;
} else {
usage (find_usage);
}

4
init.c
View File

@ -154,7 +154,7 @@ void message(int device, char *fmt, ...)
}
#else
static int log_fd=-1;
static int log_fd = -1;
/* Take full control of the log tty, and never close it.
* It's mine, all mine! Muhahahaha! */
@ -166,7 +166,7 @@ void message(int device, char *fmt, ...)
device = CONSOLE;
}
else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
log_fd=-1;
log_fd = -1;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
fflush(stderr);
return;

View File

@ -154,7 +154,7 @@ void message(int device, char *fmt, ...)
}
#else
static int log_fd=-1;
static int log_fd = -1;
/* Take full control of the log tty, and never close it.
* It's mine, all mine! Muhahahaha! */
@ -166,7 +166,7 @@ void message(int device, char *fmt, ...)
device = CONSOLE;
}
else if ((log_fd = device_open(log, O_RDWR|O_NDELAY)) < 0) {
log_fd=-1;
log_fd = -1;
fprintf(stderr, "Bummer, can't write to log on %s!\r\n", log);
fflush(stderr);
return;

View File

@ -161,7 +161,7 @@ extern int logger_main(int argc, char **argv)
message=buf;
} else {
if (argc>=1) {
message=*argv;
message = *argv;
} else {
fprintf(stderr, "No message\n");
exit( FALSE);

View File

@ -354,9 +354,9 @@ extern int mount_main (int argc, char **argv)
}
} else {
if (device == NULL)
device=*argv;
device = *argv;
else if (directory == NULL)
directory=*argv;
directory = *argv;
else {
goto goodbye;
}

View File

@ -161,7 +161,7 @@ extern int logger_main(int argc, char **argv)
message=buf;
} else {
if (argc>=1) {
message=*argv;
message = *argv;
} else {
fprintf(stderr, "No message\n");
exit( FALSE);

View File

@ -354,9 +354,9 @@ extern int mount_main (int argc, char **argv)
}
} else {
if (device == NULL)
device=*argv;
device = *argv;
else if (directory == NULL)
directory=*argv;
directory = *argv;
else {
goto goodbye;
}