]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
refclock: remove unnecessary strlen() call
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 9 May 2019 13:48:11 +0000 (15:48 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 10 May 2019 09:01:27 +0000 (11:01 +0200)
refclock.c

index 42fee4cdf5044b2890566d0a867a36c0994cf649..e50dec5e55eb1d819cdfb6a7e135d01538b2f8b1 100644 (file)
@@ -350,7 +350,7 @@ RCL_CheckDriverOptions(RCL_Instance instance, const char **options)
        option = get_next_driver_option(instance, option)) {
     for (i = 0; options && options[i]; i++) {
       len = strlen(options[i]);
-      if (!strncmp(options[i], option, strlen(options[i])) &&
+      if (!strncmp(options[i], option, len) &&
           (option[len] == '=' || option[len] == '\0'))
         break;
     }