summaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd/syslogd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-06 20:21:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-11-06 20:21:09 +0000
commit45c87b06c965566a37ea40c4c3a2c4ab09a6d582 (patch)
tree0329cb927705acfbdc1b4a39ba76c8bb84f1cb24 /usr.sbin/syslogd/syslogd.c
parent343c43e09b5129e3b2232e8615a0fda7ccb0a7ea (diff)
indent
Diffstat (limited to 'usr.sbin/syslogd/syslogd.c')
-rw-r--r--usr.sbin/syslogd/syslogd.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index ba400b7f5d3..1b82086ce65 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -218,7 +218,7 @@ main(argc, argv)
char *p, line[MSG_BSIZE + 1];
while ((ch = getopt(argc, argv, "duf:m:p:")) != -1)
- switch(ch) {
+ switch (ch) {
case 'd': /* debug */
Debug++;
break;
@@ -516,7 +516,7 @@ logmsg(pri, msg, from, flags)
/* extract program name */
for(i = 0; i < NAME_MAX; i++) {
- if(!isalnum(msg[i]))
+ if (!isalnum(msg[i]))
break;
prog[i] = msg[i];
}
@@ -542,8 +542,8 @@ logmsg(pri, msg, from, flags)
continue;
/* skip messages with the incorrect program name */
- if(f->f_program)
- if(strcmp(prog, f->f_program) != 0)
+ if (f->f_program)
+ if (strcmp(prog, f->f_program) != 0)
continue;
if (f->f_type == F_CONSOLE && (flags & IGN_CONS))
@@ -922,7 +922,7 @@ init(signo)
break;
}
next = f->f_next;
- if(f->f_program)
+ if (f->f_program)
free(f->f_program);
free((char *)f);
}
@@ -955,20 +955,21 @@ init(signo)
continue;
if (*p == NULL)
continue;
- if(*p == '#') {
+ if (*p == '#') {
p++;
- if(*p != '!')
+ if (*p != '!')
continue;
}
- if(*p == '!') {
+ if (*p == '!') {
p++;
- while(isspace(*p)) p++;
- if(!*p) {
+ while (isspace(*p))
+ p++;
+ if (!*p) {
strcpy(prog, "*");
continue;
}
- for(i = 0; i < NAME_MAX; i++) {
- if(!isalnum(p[i]))
+ for (i = 0; i < NAME_MAX; i++) {
+ if (!isalnum(p[i]))
break;
prog[i] = p[i];
}
@@ -1013,7 +1014,7 @@ init(signo)
printf("%s, ", f->f_un.f_uname[i]);
break;
}
- if(f->f_program)
+ if (f->f_program)
printf(" (%s)", f->f_program);
printf("\n");
}
@@ -1051,7 +1052,7 @@ cfline(line, f, prog)
prog = NULL;
else {
f->f_program = calloc(1, strlen(prog)+1);
- if(f->f_program)
+ if (f->f_program)
strcpy(f->f_program, prog);
}