projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bdfeb3
)
Return explicit NULL from dbiFreeIndexSet()
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 6 Jun 2011 10:10:32 +0000
(13:10 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 6 Jun 2011 10:10:32 +0000
(13:10 +0300)
- Explicit NULL is much more obvious here, also eliminate the (now)
dead NULL-assignments and add a trash-n-burn memset() just in case
lib/rpmdb.c
patch
|
blob
|
history
diff --git
a/lib/rpmdb.c
b/lib/rpmdb.c
index
7bb7068
..
c124fb1
100644
(file)
--- a/
lib/rpmdb.c
+++ b/
lib/rpmdb.c
@@
-438,10
+438,11
@@
static unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno)
static dbiIndexSet dbiFreeIndexSet(dbiIndexSet set)
{
if (set) {
- set->recs = _free(set->recs);
- set = _free(set);
+ free(set->recs);
+ memset(set, 0, sizeof(*set)); /* trash and burn */
+ free(set);
}
- return
set
;
+ return
NULL
;
}
typedef struct miRE_s {