Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libterminfo Use memcmp in place of strncmp, since length...
details: https://anonhg.NetBSD.org/src/rev/10edd11df563
branches: trunk
changeset: 779519:10edd11df563
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Jun 01 12:02:36 2012 +0000
description:
Use memcmp in place of strncmp, since length is known to no longer than
either of the arguments.
diffstat:
lib/libterminfo/term.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6b1068d73d89 -r 10edd11df563 lib/libterminfo/term.c
--- a/lib/libterminfo/term.c Fri Jun 01 10:52:38 2012 +0000
+++ b/lib/libterminfo/term.c Fri Jun 01 12:02:36 2012 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index