Print this page
11972 resync smatch
@@ -23,10 +23,14 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
+/*
* The Secure SunOS audit reduction tool - auditreduce.
* Document SM0071 is the primary source of information on auditreduce.
*
* Composed of 4 source modules:
* main.c - main driver.
@@ -245,15 +249,17 @@
}
/*
* Convert descriptors to streams.
*/
if ((pcbn->pcb_fpr = fdopen(fildes[0], "r")) == NULL) {
- perror(gettext("auditreduce: couldn't get read stream for pipe"));
+ perror(gettext("auditreduce: couldn't get read "
+ "stream for pipe"));
return (-1);
}
if ((pcbn->pcb_fpw = fdopen(fildes[1], "w")) == NULL) {
- perror(gettext("auditreduce: couldn't get write stream for pipe"));
+ perror(gettext("auditreduce: couldn't get "
+ "write stream for pipe"));
return (-1);
}
if ((procno = fork()) == -1) {
perror(gettext("auditreduce: fork failed"));
return (-1);
@@ -398,13 +404,15 @@
* Do all pcbs in parent's group up to and including us
*/
for (j = 0; j <= i; j++) {
pcbt = &pcb->pcb_below[j];
if (fclose(pcbt->pcb_fpr) == EOF) {
- if (!f_quiet)
- perror(gettext("auditreduce: initial close on pipe failed"));
+ if (!f_quiet) {
+ perror(gettext("auditreduce: initial close "
+ "on pipe failed"));
}
+ }
/*
* Free the buffer allocated to hold incoming records.
*/
if (i != j) {
free(pcbt->pcb_rec);
@@ -424,13 +432,15 @@
*/
static void
p_close(audit_pcb_t *pcbn)
{
if (fclose(pcbn->pcb_fpw) == EOF) {
- if (!f_quiet)
- perror(gettext("auditreduce: close for write pipe failed"));
+ if (!f_quiet) {
+ perror(gettext("auditreduce: close for write "
+ "pipe failed"));
}
+ }
}
/*
* .func audit_stats - print statistics.