diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-04-16 18:15:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-04-16 18:15:42 +0000 |
commit | d28701e17ddbec0090e7d8cbdd9e4f7da470824a (patch) | |
tree | 533da7f179619ef5e3bc65a1052ea1da94705597 /sbin | |
parent | d6e26526a1929e5a5c1965fa0ec324c0a8758df8 (diff) |
Since the return value from the *_info functions is only actually used as a
boolean, make it so. OK deraadt@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/fsck_ffs/pass1.c | 10 | ||||
-rw-r--r-- | sbin/fsck_ffs/pass1b.c | 10 | ||||
-rw-r--r-- | sbin/fsck_ffs/pass2.c | 10 | ||||
-rw-r--r-- | sbin/fsck_ffs/pass3.c | 10 | ||||
-rw-r--r-- | sbin/fsck_ffs/pass4.c | 10 | ||||
-rw-r--r-- | sbin/fsck_ffs/pass5.c | 10 |
6 files changed, 24 insertions, 36 deletions
diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index cb59f878992..1c00810d712 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1.c,v 1.16 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass1.c,v 1.17 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass1.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass1.c,v 1.16 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass1.c,v 1.17 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -61,10 +61,8 @@ static ino_t info_inumber; static int pass1_info(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 1, inode %d/%d", - info_inumber, sblock.fs_ipg * sblock.fs_ncg) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 1, inode %d/%d", + info_inumber, sblock.fs_ipg * sblock.fs_ncg) > 0); } void diff --git a/sbin/fsck_ffs/pass1b.c b/sbin/fsck_ffs/pass1b.c index 4fc37aff9f1..71b0844a65f 100644 --- a/sbin/fsck_ffs/pass1b.c +++ b/sbin/fsck_ffs/pass1b.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1b.c,v 1.10 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass1b.c,v 1.11 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass1b.c,v 1.10 1996/09/23 16:18:37 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass1b.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass1b.c,v 1.10 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass1b.c,v 1.11 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -56,10 +56,8 @@ static ino_t info_inumber; static int pass1b_info(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 1b, inode %d/%d", - info_inumber, sblock.fs_ipg * sblock.fs_ncg) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 1b, inode %d/%d", + info_inumber, sblock.fs_ipg * sblock.fs_ncg) > 0); } void diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index 7cc10c245f3..bec83e18a85 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass2.c,v 1.20 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass2.c,v 1.21 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass2.c,v 1.17 1996/09/27 22:45:15 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass2.c 8.6 (Berkeley) 10/27/94"; #else -static const char rcsid[] = "$OpenBSD: pass2.c,v 1.20 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass2.c,v 1.21 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -63,10 +63,8 @@ static int info_pos; static int pass2_info1(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 2, directory %d/%d", - info_pos, info_max) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 2, directory %d/%d", + info_pos, info_max) > 0); } static int diff --git a/sbin/fsck_ffs/pass3.c b/sbin/fsck_ffs/pass3.c index 7460685d197..75f7b34b144 100644 --- a/sbin/fsck_ffs/pass3.c +++ b/sbin/fsck_ffs/pass3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass3.c,v 1.9 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass3.c,v 1.10 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass3.c,v 1.8 1995/03/18 14:55:54 cgd Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass3.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass3.c,v 1.9 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass3.c,v 1.10 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -51,10 +51,8 @@ static int info_pos; static int pass3_info(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 3, directory %d/%ld", - info_pos, inplast) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 3, directory %d/%ld", + info_pos, inplast) > 0); } void diff --git a/sbin/fsck_ffs/pass4.c b/sbin/fsck_ffs/pass4.c index b7d2249e964..3ba285200b2 100644 --- a/sbin/fsck_ffs/pass4.c +++ b/sbin/fsck_ffs/pass4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass4.c,v 1.11 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass4.c,v 1.12 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass4.c,v 1.11 1996/09/27 22:45:17 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass4.c 8.1 (Berkeley) 6/5/93"; #else -static const char rcsid[] = "$OpenBSD: pass4.c,v 1.11 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass4.c,v 1.12 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -55,10 +55,8 @@ static ino_t info_inumber; static int pass4_info(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 4, inode %d/%d", - info_inumber, lastino) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 4, inode %d/%d", + info_inumber, lastino) > 0); } void diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index e098b3d9076..52695763e80 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass5.c,v 1.18 2005/04/16 17:37:25 deraadt Exp $ */ +/* $OpenBSD: pass5.c,v 1.19 2005/04/16 18:15:41 millert Exp $ */ /* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass5.c 8.6 (Berkeley) 11/30/94"; #else -static const char rcsid[] = "$OpenBSD: pass5.c,v 1.18 2005/04/16 17:37:25 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: pass5.c,v 1.19 2005/04/16 18:15:41 millert Exp $"; #endif #endif /* not lint */ @@ -60,10 +60,8 @@ static int info_maxcg; static int pass5_info(char *buf, int buflen) { - if (snprintf(buf, buflen, "phase 5, cg %d/%d", - info_cg, info_maxcg) > 0) - return (strlen(buf)); - return (0); + return (snprintf(buf, buflen, "phase 5, cg %d/%d", + info_cg, info_maxcg) > 0); } void |