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:
91cf9d8
)
Handle NULL and the same literal problem pointer in rpmProblemCompare()
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 26 Mar 2010 05:09:47 +0000
(07:09 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 26 Mar 2010 05:09:47 +0000
(07:09 +0200)
- if the pointers to compare are the same, the problem is the same
(even if NULL for our purposes)
- if they're not the same and either is NULL then they're not the same
lib/rpmprob.c
patch
|
blob
|
history
diff --git
a/lib/rpmprob.c
b/lib/rpmprob.c
index
1a5eef2
..
511a5b1
100644
(file)
--- a/
lib/rpmprob.c
+++ b/
lib/rpmprob.c
@@
-200,6
+200,10
@@
static int cmpStr(const char *s1, const char *s2)
int rpmProblemCompare(rpmProblem ap, rpmProblem bp)
{
+ if (ap == bp)
+ return 0;
+ if (ap == NULL || bp == NULL)
+ return 1;
if (ap->type != bp->type)
return 1;
if (ap->key != bp->key)