summaryrefslogtreecommitdiff
path: root/rpmdb
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-04-02 19:24:41 +0000
committerjbj <devnull@localhost>2003-04-02 19:24:41 +0000
commit1f366d6a00d1cf8dc08a40fe789a1b68b4b80a5a (patch)
treeab4b21b2fe53bcf68ddfe5098ff97b79f53a0cec /rpmdb
parentd96a0816260b82501945f1b8e015efcf0839705c (diff)
downloadlibrpm-tizen-1f366d6a00d1cf8dc08a40fe789a1b68b4b80a5a.tar.gz
librpm-tizen-1f366d6a00d1cf8dc08a40fe789a1b68b4b80a5a.tar.bz2
librpm-tizen-1f366d6a00d1cf8dc08a40fe789a1b68b4b80a5a.zip
Splint fiddles.
CVS patchset: 6728 CVS date: 2003/04/02 19:24:41
Diffstat (limited to 'rpmdb')
-rw-r--r--rpmdb/header.c9
-rw-r--r--rpmdb/rpmdb.c14
2 files changed, 15 insertions, 8 deletions
diff --git a/rpmdb/header.c b/rpmdb/header.c
index 7d33522dc..68b88fbad 100644
--- a/rpmdb/header.c
+++ b/rpmdb/header.c
@@ -2398,6 +2398,7 @@ typedef struct headerSprintfArgs_s {
const char * errmsg;
rpmec ec;
sprintfToken format;
+/*@relnull@*/
HeaderIterator hi;
/*@owned@*/
char * val;
@@ -2432,7 +2433,9 @@ fprintf(stderr, "*** hsaInit(%d): fmt %p ext[%d] %p #%d 1? %d format \"%s\" type
if (tag != NULL && tag->tag == -2)
hsa->hi = headerInitIterator(hsa->h);
}
+/*@-nullret@*/
return hsa;
+/*@=nullret@*/
}
/**
@@ -2475,7 +2478,9 @@ fprintf(stderr, "*** hsaNext(%d): fmt %p ext[%d] %p #%d 1? %d format \"%s\" type
}
#endif
+/*@-dependenttrans -onlytrans@*/
return fmt;
+/*@=dependenttrans =onlytrans@*/
}
/**
@@ -2503,7 +2508,9 @@ fprintf(stderr, "*** hsaFini(%d): fmt %p ext[%d] %p #%d 1? %d format \"%s\" type
hsa->hi = headerFreeIterator(hsa->hi);
hsa->i = 0;
}
+/*@-nullret@*/
return hsa;
+/*@=nullret@*/
}
/**
@@ -3462,7 +3469,7 @@ char * headerSprintf(Header h, const char * fmt,
(hsa->format->type == PTOK_ARRAY
? &hsa->format->u.array.format->u.tag :
NULL));
- isxml = (tag != NULL && tag->tag == -2 && !strcmp(tag->type, "xml"));
+ isxml = (tag != NULL && tag->tag == -2 && tag->type != NULL && !strcmp(tag->type, "xml"));
if (isxml) {
need = sizeof("<rpmHeader>\n") - 1;
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index d865e2257..ebe3a313d 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -714,18 +714,18 @@ int rpmdbCheckSignals(void)
* Block all signals, returning previous signal mask.
*/
static int blockSignals(/*@unused@*/ rpmdb db, /*@out@*/ sigset_t * oldMask)
- /*@globals rpmsigTbl, fileSystem @*/
- /*@modifies *oldMask, rpmsigTbl, fileSystem @*/
+ /*@globals fileSystem @*/
+ /*@modifies *oldMask, fileSystem @*/
{
sigset_t newMask;
(void) sigfillset(&newMask); /* block all signals */
(void) sigprocmask(SIG_BLOCK, &newMask, oldMask);
- sigdelset(&newMask, SIGINT);
- sigdelset(&newMask, SIGQUIT);
- sigdelset(&newMask, SIGHUP);
- sigdelset(&newMask, SIGTERM);
- sigdelset(&newMask, SIGPIPE);
+ (void) sigdelset(&newMask, SIGINT);
+ (void) sigdelset(&newMask, SIGQUIT);
+ (void) sigdelset(&newMask, SIGHUP);
+ (void) sigdelset(&newMask, SIGTERM);
+ (void) sigdelset(&newMask, SIGPIPE);
return sigprocmask(SIG_BLOCK, &newMask, NULL);
}