changeset: 57:77ce87d94081
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Mar 28 14:37:59 2007 -0400
summary: Fix strcmp in socket.c.
diff -r e412a7da376d -r 77ce87d94081 libixp/socket.c
--- a/libixp/socket.c Wed Mar 28 14:25:07 2007 -0400
+++ b/libixp/socket.c Wed Mar 28 14:37:59 2007 -0400
@@ -29,7 +29,7 @@ get_port(char *addr) {
char *s, *end;
int port;
- s = strrchr(addr, '!');
+ s = strchr(addr, '!');
if(s == nil) {
errstr = "no port provided";
return -1;
@@ -214,7 +214,7 @@ lookup(char *address, addrtab *tab) {
else {
*addr++ = '\0';
for(; tab->type; tab++)
- if(strcmp(tab->type, type)) break;
+ if(strcmp(tab->type, type) == 0) break;
if(tab->type == nil)
errstr = "unsupported address type";
else
Received on Wed Mar 28 2007 - 20:40:18 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:29 UTC