diff options
author | jbj <devnull@localhost> | 2001-10-15 17:53:34 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-10-15 17:53:34 +0000 |
commit | 72471f2e54686202a9862a3fd3bd6d0135d81d2a (patch) | |
tree | 3625a73d9ef73f4f29df80fe98fb6133041cb4bc /lib/cpio.c | |
parent | 3f462f318fd2f602fddb1a95e5d652e67aafa49e (diff) | |
download | rpm-72471f2e54686202a9862a3fd3bd6d0135d81d2a.tar.gz rpm-72471f2e54686202a9862a3fd3bd6d0135d81d2a.tar.bz2 rpm-72471f2e54686202a9862a3fd3bd6d0135d81d2a.zip |
Explicit branchstate annotations.
CVS patchset: 5113
CVS date: 2001/10/15 17:53:34
Diffstat (limited to 'lib/cpio.c')
-rw-r--r-- | lib/cpio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/cpio.c b/lib/cpio.c index b7a022cfc..8c5c2f1a0 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -181,6 +181,7 @@ const char *const cpioStrerror(int rc) int l, myerrno = errno; strcpy(msg, "cpio: "); + /*@-branchstate@*/ switch (rc) { default: s = msg + strlen(msg); @@ -216,17 +217,20 @@ const char *const cpioStrerror(int rc) case CPIOERR_INTERNAL: s = _("Internal error"); break; case CPIOERR_UNMAPPED_FILE: s = _("Archive file not in header"); break; } + /*@=branchstate@*/ l = sizeof(msg) - strlen(msg) - 1; if (s != NULL) { if (l > 0) strncat(msg, s, l); l -= strlen(s); } + /*@-branchstate@*/ if ((rc & CPIOERR_CHECK_ERRNO) && myerrno) { s = _(" failed - "); if (l > 0) strncat(msg, s, l); l -= strlen(s); if (l > 0) strncat(msg, strerror(myerrno), l); } + /*@=branchstate@*/ return msg; } |