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 /rpmio/macro.c | |
parent | 3f462f318fd2f602fddb1a95e5d652e67aafa49e (diff) | |
download | librpm-tizen-72471f2e54686202a9862a3fd3bd6d0135d81d2a.tar.gz librpm-tizen-72471f2e54686202a9862a3fd3bd6d0135d81d2a.tar.bz2 librpm-tizen-72471f2e54686202a9862a3fd3bd6d0135d81d2a.zip |
Explicit branchstate annotations.
CVS patchset: 5113
CVS date: 2001/10/15 17:53:34
Diffstat (limited to 'rpmio/macro.c')
-rw-r--r-- | rpmio/macro.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c index 075cb1a0e..b6eed68fb 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1,3 +1,4 @@ +/*@-branchstate@*/ /** \ingroup rpmrc rpmio * \file rpmio/macro.c */ @@ -83,7 +84,7 @@ typedef /*@abstract@*/ struct MacroBuf_s { static int expandMacro(MacroBuf mb) /*@globals rpmGlobalMacroContext, - fileSystem@*/ + fileSystem @*/ /*@modifies mb, fileSystem @*/; /*@-exportlocal -exportheadervar@*/ @@ -268,6 +269,7 @@ findEntry(MacroContext mc, const char * name, size_t namelen) */ /*@dependent@*/ static char * rdcl(char * buf, size_t size, FD_t fd, int escapes) + /*@globals fileSystem @*/ /*@modifies buf, fileSystem @*/ { char *q = buf; @@ -336,6 +338,7 @@ matchchar(const char * p, char pl, char pr) */ static void printMacro(MacroBuf mb, const char * s, const char * se) + /*@globals fileSystem @*/ /*@modifies fileSystem @*/ { const char *senl; @@ -379,6 +382,7 @@ printMacro(MacroBuf mb, const char * s, const char * se) */ static void printExpansion(MacroBuf mb, const char * t, const char * te) + /*@globals fileSystem @*/ /*@modifies fileSystem @*/ { const char *ellipsis; @@ -706,6 +710,7 @@ doUndefine(MacroContext mc, const char * se) #ifdef DYING static void dumpME(const char * msg, MacroEntry me) + /*@globals fileSystem @*/ /*@modifies fileSystem @*/ { if (msg) @@ -1415,13 +1420,13 @@ expandMacro(MacroBuf mb) /* =============================================================== */ int -expandMacros(void * spec, MacroContext mc, char * s, size_t slen) +expandMacros(void * spec, MacroContext mc, char * sbuf, size_t slen) { MacroBuf mb = alloca(sizeof(*mb)); char *tbuf; int rc; - if (s == NULL || slen == 0) + if (sbuf == NULL || slen == 0) return 0; if (mc == NULL) mc = rpmGlobalMacroContext; @@ -1429,7 +1434,7 @@ expandMacros(void * spec, MacroContext mc, char * s, size_t slen) memset(tbuf, 0, (slen + 1)); /*@-temptrans -assignexpose@*/ - mb->s = s; + mb->s = sbuf; /*@=temptrans =assignexpose@*/ mb->t = tbuf; mb->nb = slen; @@ -1448,7 +1453,7 @@ expandMacros(void * spec, MacroContext mc, char * s, size_t slen) rpmError(RPMERR_BADSPEC, _("Target buffer overflow\n")); tbuf[slen] = '\0'; /* XXX just in case */ - strncpy(s, tbuf, (slen - mb->nb + 1)); + strncpy(sbuf, tbuf, (slen - mb->nb + 1)); return rc; } @@ -1983,3 +1988,4 @@ main(int argc, char *argv[]) } #endif /* EVAL_MACROS */ #endif /* DEBUG_MACROS */ +/*@=branchstate@*/ |