summaryrefslogtreecommitdiff
path: root/src/libexecline/el_vardupl.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:24:30 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-12 13:24:30 +0000
commit54979a7b81a397eca8438d3def2a0fe5b19825e0 (patch)
tree4dac9941e6bca1d693cfb9c0388abdb96e202fcb /src/libexecline/el_vardupl.c
parent10cb49f302ab1084c5b86d4c47da17d8abf09159 (diff)
downloadexecline-54979a7b81a397eca8438d3def2a0fe5b19825e0.tar.xz
Fix a few omissions
Diffstat (limited to 'src/libexecline/el_vardupl.c')
-rw-r--r--src/libexecline/el_vardupl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexecline/el_vardupl.c b/src/libexecline/el_vardupl.c
index 9efd586..d6c7dbf 100644
--- a/src/libexecline/el_vardupl.c
+++ b/src/libexecline/el_vardupl.c
@@ -1,13 +1,12 @@
/* ISC license. */
-#include <sys/types.h>
-#include <skalibs/bytestr.h>
+#include <string.h>
#include <execline/execline.h>
int el_vardupl (char const *key, char const *s, size_t len)
{
size_t i = 0 ;
- for (; i < len ; i += str_len(s + i) + 1)
- if (!str_diff(key, s + i)) return 1 ;
+ for (; i < len ; i += strlen(s + i) + 1)
+ if (!strcmp(key, s + i)) return 1 ;
return 0 ;
}