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

View File

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

4
date.c
View File

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

6
find.c
View File

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

View File

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

4
init.c
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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