Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/ntp/dist/sntp/libopts As far as I (and my compi...



details:   https://anonhg.NetBSD.org/src/rev/0b77276e325c
branches:  trunk
changeset: 812081:0b77276e325c
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 30 10:37:25 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 b92923677a8f -r 0b77276e325c external/bsd/ntp/dist/sntp/libopts/enum.c
--- a/external/bsd/ntp/dist/sntp/libopts/enum.c Mon Nov 30 07:51:44 2015 +0000
+++ b/external/bsd/ntp/dist/sntp/libopts/enum.c Mon Nov 30 10:37:25 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: enum.c,v 1.5 2015/07/10 14:20:35 christos Exp $        */
+/*     $NetBSD: enum.c,v 1.6 2015/11/30 10:37:25 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