Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax Change all the 'return(x)' to 'return c'.



details:   https://anonhg.NetBSD.org/src/rev/c2a9887d42d7
branches:  trunk
changeset: 588187:c2a9887d42d7
user:      dsl <dsl%NetBSD.org@localhost>
date:      Sat Feb 11 10:43:17 2006 +0000

description:
Change all the 'return(x)' to 'return c'.
Makes some other searches I want to do a bit easier.

diffstat:

 bin/pax/ar_io.c     |  130 ++++++++++++++++++++++----------------------
 bin/pax/ar_subs.c   |   28 ++++----
 bin/pax/buf_subs.c  |   94 ++++++++++++++++----------------
 bin/pax/cpio.c      |  152 ++++++++++++++++++++++++++--------------------------
 bin/pax/file_subs.c |   80 +++++++++++++-------------
 bin/pax/ftree.c     |   40 ++++++------
 bin/pax/gen_subs.c  |   16 ++--
 bin/pax/getoldopt.c |   10 +-
 bin/pax/options.c   |   46 +++++++-------
 bin/pax/pat_rep.c   |  106 ++++++++++++++++++------------------
 bin/pax/pax.c       |   24 ++++----
 bin/pax/sel_subs.c  |   66 +++++++++++-----------
 bin/pax/tables.c    |  112 +++++++++++++++++++-------------------
 bin/pax/tar.c       |  118 ++++++++++++++++++++--------------------
 bin/pax/tty_subs.c  |   14 ++--
 15 files changed, 518 insertions(+), 518 deletions(-)

diffs (truncated from 3922 to 300 lines):

diff -r b98c8ba7e169 -r c2a9887d42d7 bin/pax/ar_io.c
--- a/bin/pax/ar_io.c   Sat Feb 11 10:38:07 2006 +0000
+++ b/bin/pax/ar_io.c   Sat Feb 11 10:43:17 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ar_io.c,v 1.46 2005/05/01 02:59:28 christos Exp $      */
+/*     $NetBSD: ar_io.c,v 1.47 2006/02/11 10:43:17 dsl Exp $   */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)ar_io.c    8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: ar_io.c,v 1.46 2005/05/01 02:59:28 christos Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.47 2006/02/11 10:43:17 dsl Exp $");
 #endif
 #endif /* not lint */
 
@@ -192,14 +192,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
         */
@@ -208,7 +208,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",
@@ -216,7 +216,7 @@
                (void)close(arfd);
                arfd = -1;
                can_unlnk = 0;
-               return(-1);
+               return -1;
        }
 
        if (S_ISCHR(arsb.st_mode)) {
@@ -262,7 +262,7 @@
        if (act == ARCHIVE) {
                blksz = rdblksz = wrblksz;
                lstrval = 1;
-               return(0);
+               return 0;
        }
 
        /*
@@ -355,7 +355,7 @@
                break;
        }
        lstrval = 1;
-       return(0);
+       return 0;
 }
 
 /*
@@ -537,7 +537,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
@@ -546,9 +546,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;
 }
 
 /*
@@ -566,15 +566,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
@@ -594,7 +594,7 @@
        while (((r = read(fd, buf, bsz)) < 0) && errno == EINTR)
                continue;
 
-       return(r);
+       return r;
 }
 
 /*
@@ -612,7 +612,7 @@
        while (((r = rmtread(fd, buf, bsz)) < 0) && errno == EINTR)
                continue;
 
-       return(r);
+       return r;
 }
 #endif
 
@@ -644,7 +644,7 @@
                nread += r;
        } while (bsz > 0);
 
-       return(nread ? nread : r);
+       return nread ? nread : r;
 }
 
 #ifdef SYS_NO_RESTART
@@ -664,7 +664,7 @@
        while (((r = write(fd, buf, bsz)) < 0) && errno == EINTR)
                ;
 
-       return(r);
+       return r;
 }
 
 /*
@@ -683,7 +683,7 @@
        while (((r = rmtwrite(fd, buf, bsz)) < 0) && errno == EINTR)
                ;
 
-       return(r);
+       return r;
 }
 #endif
 
@@ -715,7 +715,7 @@
                written += r;
        } while (bsz > 0);
 
-       return(written ? written : r);
+       return written ? written : r;
 }
 
 /*
@@ -736,7 +736,7 @@
         * if last i/o was in error, no more reads until reset or new volume
         */
        if (lstrval <= 0)
-               return(lstrval);
+               return lstrval;
 
        /*
         * how we read must be based on device type
@@ -774,7 +774,7 @@
                                if (rdblksz % BLKMULT)
                                        invld_rec = 1;
                        }
-                       return(res);
+                       return res;
                }
                break;
        case ISREG:
@@ -791,7 +791,7 @@
                 */
                if ((res = read_with_restart(arfd, buf, cnt)) > 0) {
                        io_ok = 1;
-                       return(res);
+                       return res;
                }
                break;
        }
@@ -804,7 +804,7 @@
                syswarn(1, errno, "Failed read on archive volume %d", arvol);
        else
                tty_warn(0, "End of archive volume %d reached", arvol);
-       return(res);
+       return res;
 }
 
 /*
@@ -829,12 +829,12 @@
         * an archive volume prevent further writes to it.
         */
        if (lstrval <= 0)
-               return(lstrval);
+               return lstrval;
 
        if ((res = xwrite(arfd, buf, bsz)) == bsz) {
                wr_trail = 1;
                io_ok = 1;
-               return(bsz);
+               return bsz;
        }
        /*
         * write broke, see what we can do with it. We try to send any partial
@@ -885,7 +885,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
@@ -923,7 +923,7 @@
        if (!wr_trail && (res <= 0)) {
                tty_warn(1,
                    "Unable to append, trailer re-write failed. Quitting.");
-               return(res);
+               return res;
        }
 
        if (res == 0)
@@ -935,7 +935,7 @@
                    "WARNING: partial archive write. Archive MAY BE FLAWED");
        else
                tty_warn(1,"WARNING: partial archive write. Archive IS FLAWED");
-       return(res);
+       return res;
 }
 
 /*
@@ -962,11 +962,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;
@@ -1034,10 +1034,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;
 }
 
 /*
@@ -1058,13 +1058,13 @@
 
        *skipped = 0;
        if (sksz <= 0)
-               return(0);
+               return 0;
 
        /*
         * we cannot move forward at EOF or error
         */
        if (lstrval <= 0)
-               return(lstrval);
+               return lstrval;
 
        /*
         * Safer to read forward on devices where it is hard to find the end of
@@ -1077,7 +1077,7 @@
            || artyp == ISRMT
 #endif /* SUPPORT_RMT */
            )
-               return(0);
+               return 0;
 
        /*
         * figure out where we are in the archive
@@ -1094,15 +1094,15 @@
                        mpos = arsb.st_size;
                if ((mpos = lseek(arfd, mpos, SEEK_SET)) >= 0) {
                        *skipped = mpos - cpos;



Home | Main Index | Thread Index | Old Index