Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/external/bsd/ntp/dist/sntp/libopts As far as I (and my co...



details:   https://anonhg.NetBSD.org/src/rev/b587788e38fd
branches:  netbsd-7
changeset: 799725:b587788e38fd
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 30 10:31:04 2015 +0000

description:
As far as I (and my compiler) can tell, there's no need to cast
the arg to strncmp().

diffstat:

 external/bsd/ntp/dist/sntp/libopts/enum.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r b3c7b12ed20c -r b587788e38fd external/bsd/ntp/dist/sntp/libopts/enum.c
--- a/external/bsd/ntp/dist/sntp/libopts/enum.c Tue Nov 24 17:39:13 2015 +0000
+++ b/external/bsd/ntp/dist/sntp/libopts/enum.c Mon Nov 30 10:31:04 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: enum.c,v 1.2.6.2 2015/11/08 01:51:12 riz Exp $ */
+/*     $NetBSD: enum.c,v 1.2.6.3 2015/11/30 10:31:04 he Exp $  */
 
 
 /**
@@ -217,7 +217,7 @@
      *  Multiple partial matches means we have an ambiguous match.
      */
     for (idx = 0; idx < name_ct; idx++) {
-        if (strncmp(paz_names[idx], (const char *)name, len) == 0) {
+        if (strncmp(paz_names[idx], name, len) == 0) {
             if (paz_names[idx][len] == NUL)
                 return idx;  /* full match */
 



Home | Main Index | Thread Index | Old Index