Module Name: src
Committed By: joerg
Date: Fri Jun 1 12:02:36 UTC 2012
Modified Files:
src/lib/libterminfo: term.c
Log Message:
Use memcmp in place of strncmp, since length is known to no longer than
either of the arguments.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/lib/libterminfo/term.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libterminfo/term.c
diff -u src/lib/libterminfo/term.c:1.13 src/lib/libterminfo/term.c:1.14
--- src/lib/libterminfo/term.c:1.13 Mon Oct 3 19:18:55 2011
+++ src/lib/libterminfo/term.c Fri Jun 1 12:02:36 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: term.c,v 1.13 2011/10/03 19:18:55 roy Exp $ */
+/* $NetBSD: term.c,v 1.14 2012/06/01 12:02:36 joerg Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: term.c,v 1.13 2011/10/03 19:18:55 roy Exp $");
+__RCSID("$NetBSD: term.c,v 1.14 2012/06/01 12:02:36 joerg Exp $");
#include <sys/stat.h>
@@ -297,7 +297,7 @@ ticcmp(const TIC *tic, const char *name)
l = strlen(alias);
else
l = s - alias;
- if (len == l && strncmp(alias, name, l) == 0)
+ if (len == l && memcmp(alias, name, l) == 0)
return 0;
if (s == NULL)
break;