projects
/
liboping.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09b7862
)
Fix usage of `strcasecmp' in `ping_host_remove'.
author
Wojtek
<wojtek@gni.pl>
Fri, 1 Dec 2006 08:13:57 +0000
(09:13 +0100)
committer
Florian Forster
<octo@verplant.org>
Fri, 1 Dec 2006 08:15:41 +0000
(09:15 +0100)
The compare function needs to be checked wether it returns zero. Without this
fix the first host is being removed unless it's the host being looked for.
That is obviously not good nor correct.
src/liboping.c
patch
|
blob
|
history
diff --git
a/src/liboping.c
b/src/liboping.c
index
c42b50f
..
f749301
100644
(file)
--- a/
src/liboping.c
+++ b/
src/liboping.c
@@
-1192,7
+1192,7
@@
int ping_host_remove (pingobj_t *obj, const char *host)
while (cur != NULL)
{
- if (strcasecmp (host, cur->hostname))
+ if (strcasecmp (host, cur->hostname)
== 0
)
break;
pre = cur;