From 21367ca056b4fe2ff7e3acedd532093fe3994610 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 30 May 2002 18:47:44 +0000 Subject: minor tweaks --- usr.sbin/sa/main.c | 10 +++++----- usr.sbin/sa/pdb.c | 8 ++++---- usr.sbin/sa/usrdb.c | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'usr.sbin/sa') diff --git a/usr.sbin/sa/main.c b/usr.sbin/sa/main.c index a97ec921ac8..0fcc3a96e13 100644 --- a/usr.sbin/sa/main.c +++ b/usr.sbin/sa/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.8 2002/05/30 18:43:40 deraadt Exp $ */ +/* $OpenBSD: main.c,v 1.9 2002/05/30 18:47:44 deraadt Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou * All rights reserved. @@ -30,11 +30,11 @@ */ #ifndef LINT -static char copright[] = +static char copright[] = "@(#) Copyright (c) 1994 Christopher G. Demetriou\n\ All rights reserved.\n"; -static char rcsid[] = "$Id: main.c,v 1.8 2002/05/30 18:43:40 deraadt Exp $"; +static char rcsid[] = "$Id: main.c,v 1.9 2002/05/30 18:47:44 deraadt Exp $"; #endif /* @@ -168,7 +168,7 @@ main(int argc, char **argv) break; case '?': default: - (void)fprintf(stderr, + (void)fprintf(stderr, "usage: %s [-abcdDfijkKlmnqrstu] [-v cutoff]" " [file ...]\n", __progname); exit(1); @@ -223,7 +223,7 @@ main(int argc, char **argv) unmask = 0; error = 1; } - if (unmask && + if (unmask && (sigprocmask(SIG_BLOCK, &nmask, &omask) == -1)) { warn("couldn't set signal mask "); unmask = 0; diff --git a/usr.sbin/sa/pdb.c b/usr.sbin/sa/pdb.c index 12cf487e816..3291d884e4b 100644 --- a/usr.sbin/sa/pdb.c +++ b/usr.sbin/sa/pdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdb.c,v 1.5 2002/05/30 18:43:40 deraadt Exp $ */ +/* $OpenBSD: pdb.c,v 1.6 2002/05/30 18:47:44 deraadt Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou * All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: pdb.c,v 1.5 2002/05/30 18:43:40 deraadt Exp $"; +static char rcsid[] = "$Id: pdb.c,v 1.6 2002/05/30 18:47:44 deraadt Exp $"; #endif #include @@ -137,10 +137,10 @@ pacct_add(const struct cmdinfo *ci) memset(&newci, 0, sizeof(newci)); memcpy(newci.ci_comm, key.data, key.size); } - + add_ci(ci, &newci); - data.data = &newci; + data.data = &newci; data.size = sizeof(newci); rv = DB_PUT(pacct_db, &key, &data, 0); if (rv < 0) { diff --git a/usr.sbin/sa/usrdb.c b/usr.sbin/sa/usrdb.c index 306efd65ff4..7eadbb89f77 100644 --- a/usr.sbin/sa/usrdb.c +++ b/usr.sbin/sa/usrdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usrdb.c,v 1.5 2002/05/30 18:43:40 deraadt Exp $ */ +/* $OpenBSD: usrdb.c,v 1.6 2002/05/30 18:47:44 deraadt Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou * All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: usrdb.c,v 1.5 2002/05/30 18:43:40 deraadt Exp $"; +static char rcsid[] = "$Id: usrdb.c,v 1.6 2002/05/30 18:47:44 deraadt Exp $"; #endif #include @@ -88,7 +88,7 @@ usracct_init() warn("initializing user accounting stats"); error = -1; break; - } + } serr = DB_SEQ(saved_usracct_db, &key, &data, R_NEXT); if (serr < 0) { @@ -154,7 +154,7 @@ usracct_add(const struct cmdinfo *ci) newui.ui_mem += ci->ci_mem; newui.ui_io += ci->ci_io; - data.data = &newui; + data.data = &newui; data.size = sizeof(newui); rv = DB_PUT(usracct_db, &key, &data, 0); if (rv < 0) { @@ -272,7 +272,7 @@ uid_compare(const DBT *k1, const DBT *k2) memcpy(&d1, k1->data, sizeof(d1)); memcpy(&d2, k2->data, sizeof(d2)); - + if (d1 < d2) return -1; else if (d1 == d2) -- cgit v1.2.3-59-g8ed1b