From 72471f2e54686202a9862a3fd3bd6d0135d81d2a Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 15 Oct 2001 17:53:34 +0000 Subject: Explicit branchstate annotations. CVS patchset: 5113 CVS date: 2001/10/15 17:53:34 --- lib/cpio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/cpio.c') 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; } -- cgit v1.2.3