diff options
author | jbj <devnull@localhost> | 2001-12-08 17:21:36 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-12-08 17:21:36 +0000 |
commit | 85f676ed6637f2ff677d6b32c0e1f547df7fe9ee (patch) | |
tree | 146c81d6f7596f445385fc9b4cfad8235a40a7af /lib | |
parent | 58f451f3c3240f76874e27bff8325dea88134e7e (diff) | |
download | librpm-tizen-85f676ed6637f2ff677d6b32c0e1f547df7fe9ee.tar.gz librpm-tizen-85f676ed6637f2ff677d6b32c0e1f547df7fe9ee.tar.bz2 librpm-tizen-85f676ed6637f2ff677d6b32c0e1f547df7fe9ee.zip |
- lclint-3.0.0.19 fiddles.
CVS patchset: 5217
CVS date: 2001/12/08 17:21:36
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psm.c | 6 | ||||
-rw-r--r-- | lib/rpmfi.c | 5 | ||||
-rw-r--r-- | lib/rpmte.c | 4 | ||||
-rw-r--r-- | lib/signature.c | 2 |
4 files changed, 11 insertions, 6 deletions
@@ -801,6 +801,7 @@ static int runScript(PSM_t psm, Header h, } if (out == NULL) return 1; /* XXX can't happen */ + /*@-branchstate@*/ if (!(child = fork())) { const char * rootDir; int pipes[2]; @@ -812,7 +813,6 @@ static int runScript(PSM_t psm, Header h, xx = dup2(pipes[0], STDIN_FILENO); xx = close(pipes[0]); - /*@-branchstate@*/ if (ts->scriptFd != NULL) { int sfdno = Fileno(ts->scriptFd); int ofdno = Fileno(out); @@ -828,9 +828,7 @@ static int runScript(PSM_t psm, Header h, xx = Fclose (ts->scriptFd); } } - /*@=branchstate@*/ - /*@-branchstate@*/ { const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL); const char *path = SCRIPT_PATH; @@ -842,7 +840,6 @@ static int runScript(PSM_t psm, Header h, ipath = _free(ipath); /*@=modobserver@*/ } - /*@=branchstate@*/ for (i = 0; i < numPrefixes; i++) { sprintf(prefixBuf, "RPM_INSTALL_PREFIX%d=%s", i, prefixes[i]); @@ -877,6 +874,7 @@ static int runScript(PSM_t psm, Header h, _exit(-1); /*@notreached@*/ } + /*@=branchstate@*/ if (waitpid(child, &status, 0) < 0) { rpmError(RPMERR_SCRIPT, diff --git a/lib/rpmfi.c b/lib/rpmfi.c index 3f1b239e4..4560cb887 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -864,7 +864,8 @@ TFI_t fiNew(rpmTransactionSet ts, TFI_t fi, xx = hge(h, RPMTAG_FILELANGS, NULL, (void **) &fi->flangs, NULL); xx = hge(h, RPMTAG_FILEMD5S, NULL, (void **) &fi->fmd5s, NULL); - fi->md5s = t = xmalloc(fi->fc * 16); + t = xmalloc(fi->fc * 16); + fi->md5s = t; for (i = 0; i < fi->fc; i++) { const char * fmd5; int j; @@ -895,7 +896,9 @@ TFI_t fiNew(rpmTransactionSet ts, TFI_t fi, if (fi->te != NULL && fi->te->type == TR_ADDED) { Header foo; fi->actions = xcalloc(fi->fc, sizeof(*fi->actions)); + /*@-compdef@*/ /* FIX: fi-md5s undefined */ foo = relocateFileList(ts, fi, h, fi->actions); + /*@=compdef@*/ fi->h = headerFree(fi->h, "fiNew fi->h"); fi->h = headerLink(foo, "fiNew fi->h = foo"); foo = headerFree(foo, "fiNew foo"); diff --git a/lib/rpmte.c b/lib/rpmte.c index aacb41d8c..b6eccf8bc 100644 --- a/lib/rpmte.c +++ b/lib/rpmte.c @@ -377,8 +377,10 @@ teIterator XteFreeIterator(/*@only@*//*@null@*/ teIterator tei, { if (tei) tei->ts = rpmtsUnlink(tei->ts, "tsIterator"); +/*@-modfilesys@*/ if (_te_debug) fprintf(stderr, "*** tei %p -- %s:%d\n", tei, fn, ln); +/*@=modfilesys@*/ return _free(tei); } @@ -392,8 +394,10 @@ teIterator XteInitIterator(rpmTransactionSet ts, tei->reverse = ((ts->transFlags & RPMTRANS_FLAG_REVERSE) ? 1 : 0); tei->oc = (tei->reverse ? (ts->orderCount - 1) : 0); tei->ocsave = tei->oc; +/*@-modfilesys@*/ if (_te_debug) fprintf(stderr, "*** tei %p ++ %s:%d\n", tei, fn, ln); +/*@=modfilesys@*/ return tei; } diff --git a/lib/signature.c b/lib/signature.c index 156ca432c..affd18d7d 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -207,7 +207,7 @@ rpmRC rpmReadSignature(FD_t fd, Header * headerp, sigType sig_type) int rpmWriteSignature(FD_t fd, Header h) { - static byte buf[8] = "\000\000\000\000\000\000\000\000"; + static byte buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; int sigSize, pad; int rc; |