comparison common/strhelp.c @ 136:5fa4791d6d0e

Replaced unnecessary strncmp with strcmp.
author Sascha Wilde <wilde@intevation.de>
date Mon, 24 Mar 2014 15:36:12 +0100
parents 3fb6ddd6b70d
children b026e6d2a161
comparison
equal deleted inserted replaced
135:3fb6ddd6b70d 136:5fa4791d6d0e
108 str_equal (char *s1, char *s2) 108 str_equal (char *s1, char *s2)
109 { 109 {
110 size_t l1 = strlen(s1); 110 size_t l1 = strlen(s1);
111 size_t l2 = strlen(s2); 111 size_t l2 = strlen(s2);
112 if ((l1 == l2) && 112 if ((l1 == l2) &&
113 (strncmp(s1, s2, l1) == 0)) 113 (strcmp(s1, s2) == 0))
114 return true; 114 return true;
115 else 115 else
116 return false; 116 return false;
117 } 117 }
118 118

http://wald.intevation.org/projects/trustbridge/