projects
/
project
/
usteer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54f726f
)
remote: fix incorrect use of strcmp result
author
David Bauer
<mail@david-bauer.net>
Sun, 5 Sep 2021 16:03:21 +0000
(18:03 +0200)
committer
David Bauer
<mail@david-bauer.net>
Tue, 21 Sep 2021 17:47:56 +0000
(19:47 +0200)
When checking if the hostaddresses match up, the result returned from
strcmp was incorrectly evaluated. strcmp returns 0 in case both strings
match.
Signed-off-by: David Bauer <mail@david-bauer.net>
remote.c
patch
|
blob
|
history
diff --git
a/remote.c
b/remote.c
index 38239babac0a23be82291f578725d352d6ce08da..8e6e37eedd5572911de2032dfca1ce960a529952 100644
(file)
--- a/
remote.c
+++ b/
remote.c
@@
-213,7
+213,7
@@
interface_get_host(const char *addr, unsigned long id)
avl_insert(&remote_hosts, &host->avl);
out:
- if (host->addr &&
strcmp(host->addr, addr) != 0
)
+ if (host->addr &&
!strcmp(host->addr, addr)
)
return host;
free(host->addr);