projects
/
platform
/
upstream
/
libsolv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4490a3
)
solv_vercmp_haiku(): Fix unnormalized return value
author
Ingo Weinhold
<ingo_weinhold@gmx.de>
Mon, 20 May 2013 14:35:27 +0000
(16:35 +0200)
committer
Michael Schroeder
<mls@suse.de>
Mon, 17 Jun 2013 12:43:29 +0000
(14:43 +0200)
The function is required to return -1, 0, or 1, the return value of the
called solv_cmp_version_part_haiku() isn't normalized this way, though.
src/evr.c
patch
|
blob
|
history
diff --git
a/src/evr.c
b/src/evr.c
index
e8fd12d
..
302c44d
100644
(file)
--- a/
src/evr.c
+++ b/
src/evr.c
@@
-284,7
+284,8
@@
solv_vercmp_haiku(const char *s1, const char *q1, const char *s2, const char *q2
if (pre2 == q2)
return -1;
- return solv_cmp_version_part_haiku(pre1 + 1, q1, pre2 + 1, q2);
+ cmp = solv_cmp_version_part_haiku(pre1 + 1, q1, pre2 + 1, q2);
+ return cmp == 0 ? 0 : cmp < 0 ? -1 : 1; /* must return -1, 0, or 1 */
}
#endif /* HAIKU */