pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/pax/files Removed extra parentheses around s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d5b5e5362c4d
branches: trunk
changeset: 526353:d5b5e5362c4d
user: rillig <rillig%pkgsrc.org@localhost>
date: Thu Mar 08 17:18:18 2007 +0000
description:
Removed extra parentheses around simple return statements, to align with
the current NetBSD version.
diffstat:
archivers/pax/files/ar_io.c | 94 +++++++++++++++---------------
archivers/pax/files/ar_subs.c | 28 ++++----
archivers/pax/files/buf_subs.c | 82 +++++++++++++-------------
archivers/pax/files/cpio.c | 124 ++++++++++++++++++++--------------------
archivers/pax/files/file_subs.c | 72 +++++++++++-----------
archivers/pax/files/ftree.c | 40 ++++++------
archivers/pax/files/gen_subs.c | 12 +-
archivers/pax/files/options.c | 38 ++++++------
archivers/pax/files/pat_rep.c | 92 ++++++++++++++--------------
archivers/pax/files/pax.c | 14 ++--
archivers/pax/files/sel_subs.c | 66 ++++++++++----------
archivers/pax/files/tables.c | 100 ++++++++++++++++----------------
archivers/pax/files/tar.c | 102 ++++++++++++++++----------------
archivers/pax/files/tty_subs.c | 14 ++--
14 files changed, 439 insertions(+), 439 deletions(-)
diffs (truncated from 3293 to 300 lines):
diff -r aa2195d01538 -r d5b5e5362c4d archivers/pax/files/ar_io.c
--- a/archivers/pax/files/ar_io.c Thu Mar 08 17:11:46 2007 +0000
+++ b/archivers/pax/files/ar_io.c Thu Mar 08 17:18:18 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_io.c,v 1.9 2005/12/01 03:00:01 minskim Exp $ */
+/* $NetBSD: ar_io.c,v 1.10 2007/03/08 17:18:18 rillig Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -48,7 +48,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.9 2005/12/01 03:00:01 minskim Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.10 2007/03/08 17:18:18 rillig Exp $");
#endif
#endif /* not lint */
@@ -232,14 +232,14 @@
*/
arcname = NONE;
lstrval = 1;
- return(0);
+ return 0;
}
if (arfd < 0)
- return(-1);
+ return -1;
if (chdname != NULL)
if (dochdir(chdname) == -1)
- return(-1);
+ return -1;
/*
* set up is based on device type
*/
@@ -248,7 +248,7 @@
(void)close(arfd);
arfd = -1;
can_unlnk = 0;
- return(-1);
+ return -1;
}
if (S_ISDIR(arsb.st_mode)) {
tty_warn(0, "Cannot write an archive on top of a directory %s",
@@ -256,7 +256,7 @@
(void)close(arfd);
arfd = -1;
can_unlnk = 0;
- return(-1);
+ return -1;
}
if (S_ISCHR(arsb.st_mode)) {
@@ -302,7 +302,7 @@
if (act == ARCHIVE) {
blksz = rdblksz = wrblksz;
lstrval = 1;
- return(0);
+ return 0;
}
/*
@@ -397,7 +397,7 @@
break;
}
lstrval = 1;
- return(0);
+ return 0;
}
/*
@@ -582,7 +582,7 @@
* Add any device dependent code as required here
*/
if (artyp != ISREG)
- return(0);
+ return 0;
/*
* Ok we have an archive in a regular file. If we were rewriting a
* file, we must get rid of all the stuff after the current offset
@@ -591,9 +591,9 @@
if (((cpos = lseek(arfd, (off_t)0L, SEEK_CUR)) < 0) ||
(ftruncate(arfd, cpos) < 0)) {
syswarn(1, errno, "Unable to truncate archive file");
- return(-1);
+ return -1;
}
- return(0);
+ return 0;
}
/*
@@ -611,15 +611,15 @@
if (artyp == ISPIPE) {
tty_warn(1,
"Cannot append to an archive obtained from a pipe.");
- return(-1);
+ return -1;
}
if (!invld_rec)
- return(0);
+ return 0;
tty_warn(1,
"Cannot append, device record size %d does not support %s spec",
rdblksz, argv0);
- return(-1);
+ return -1;
}
#ifdef SYS_NO_RESTART
@@ -934,7 +934,7 @@
tty_warn(0,
"Write failed, archive is write protected.");
res = lstrval = 0;
- return(0);
+ return 0;
}
/*
* see if we reached the end of media, if so force a change to
@@ -1011,11 +1011,11 @@
* we need to go to the next volume not try a resync
*/
if ((done > 0) || (lstrval == 0))
- return(-1);
+ return -1;
if ((act == APPND) || (act == ARCHIVE)) {
tty_warn(1, "Cannot allow updates to an archive with flaws.");
- return(-1);
+ return -1;
}
if (io_ok)
did_io = 1;
@@ -1083,10 +1083,10 @@
}
if (lstrval <= 0) {
tty_warn(1, "Unable to recover from an archive read failure.");
- return(-1);
+ return -1;
}
tty_warn(0, "Attempting to recover from an archive read failure.");
- return(0);
+ return 0;
}
/*
@@ -1107,7 +1107,7 @@
*skipped = 0;
if (sksz <= 0)
- return(0);
+ return 0;
/*
* we cannot move forward at EOF or error
@@ -1129,7 +1129,7 @@
|| artyp == ISRMT
#endif /* SUPPORT_RMT */
)
- return(0);
+ return 0;
/*
* figure out where we are in the archive
@@ -1146,15 +1146,15 @@
mpos = arsb.st_size;
if ((mpos = lseek(arfd, mpos, SEEK_SET)) >= 0) {
*skipped = mpos - cpos;
- return(0);
+ return 0;
}
} else {
if (artyp != ISREG)
- return(0); /* non-seekable device */
+ return 0; /* non-seekable device */
}
syswarn(1, errno, "Forward positioning operation on archive failed");
lstrval = -1;
- return(-1);
+ return -1;
}
/*
@@ -1192,7 +1192,7 @@
*/
tty_warn(1, "Reverse positioning on pipes is not supported.");
lstrval = -1;
- return(-1);
+ return -1;
case ISREG:
case ISBLK:
case ISCHR:
@@ -1211,7 +1211,7 @@
syswarn(1, errno,
"Unable to obtain current archive byte offset");
lstrval = -1;
- return(-1);
+ return -1;
}
/*
@@ -1229,14 +1229,14 @@
tty_warn(1,
"Reverse position on previous volume.");
lstrval = -1;
- return(-1);
+ return -1;
}
cpos = (off_t)0L;
}
if (lseek(arfd, cpos, SEEK_SET) < 0) {
syswarn(1, errno, "Unable to seek archive backwards");
lstrval = -1;
- return(-1);
+ return -1;
}
break;
case ISTAPE:
@@ -1253,7 +1253,7 @@
*/
if ((phyblk = get_phys()) <= 0) {
lstrval = -1;
- return(-1);
+ return -1;
}
/*
@@ -1276,7 +1276,7 @@
tty_warn(1,
"Tape drive unable to backspace requested amount");
lstrval = -1;
- return(-1);
+ return -1;
}
/*
@@ -1294,7 +1294,7 @@
syswarn(1, errno, "Unable to backspace tape %ld blocks.",
(long) mb.mt_count);
lstrval = -1;
- return(-1);
+ return -1;
}
#else
tty_warn(1, "System does not have tape support");
@@ -1302,7 +1302,7 @@
break;
}
lstrval = 1;
- return(0);
+ return 0;
}
#ifdef SUPPORT_TAPE
@@ -1345,7 +1345,7 @@
padsz += res;
if (res < 0) {
syswarn(1, errno, "Unable to locate tape filemark.");
- return(-1);
+ return -1;
}
}
@@ -1363,7 +1363,7 @@
#endif /* SUPPORT_RMT */
< 0) {
syswarn(1, errno, "Unable to backspace over tape filemark.");
- return(-1);
+ return -1;
}
/*
@@ -1380,7 +1380,7 @@
#endif /* SUPPORT_RMT */
< 0) {
syswarn(1, errno, "Unable to backspace over last tape block.");
- return(-1);
+ return -1;
}
if ((phyblk =
#ifdef SUPPORT_RMT
@@ -1390,7 +1390,7 @@
#endif /* SUPPORT_RMT */
) <= 0) {
syswarn(1, errno, "Cannot determine archive tape blocksize.");
- return(-1);
+ return -1;
}
/*
@@ -1407,7 +1407,7 @@
;
if (res < 0) {
syswarn(1, errno, "Unable to locate tape filemark.");
- return(-1);
+ return -1;
}
mb.mt_op = MTBSF;
Home |
Main Index |
Thread Index |
Old Index