From 521f7d58be11c4e31d65be8cdcb9d5823cdb5653 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 10 Apr 2008 11:33:09 +0200 Subject: [PATCH] [xutil] Do not use strncmp here Signed-off-by: Julien Danjou --- common/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/util.c b/common/util.c index 5d80d175f..d16fc0b0d 100644 --- a/common/util.c +++ b/common/util.c @@ -99,15 +99,15 @@ name_func_lookup(const char *funcname, const name_func_link_t *list) Position position_get_from_str(const char *pos) { - if(!a_strncmp(pos, "top", 3)) + if(!a_strcmp(pos, "top")) return Top; - else if(!a_strncmp(pos, "bottom", 6)) + else if(!a_strcmp(pos, "bottom")) return Bottom; - else if(!a_strncmp(pos, "right", 5)) + else if(!a_strcmp(pos, "right")) return Right; - else if(!a_strncmp(pos, "left", 4)) + else if(!a_strcmp(pos, "left")) return Left; - else if(!a_strncmp(pos, "auto", 4)) + else if(!a_strcmp(pos, "auto")) return Auto; return Off; }