]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
lib: bpf_glue: remove useless assignment
authorAndrea Claudi <aclaudi@redhat.com>
Sat, 7 Aug 2021 16:58:02 +0000 (18:58 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 11 Aug 2021 03:01:54 +0000 (20:01 -0700)
The value of s used inside the cycle is the result of strstr(), so this
assignment is useless.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
lib/bpf_glue.c

index eaa9504f34fb36a8a1f2c9165d318409eb458688..70d001840f7b1c87a21c1c15a4c284359376d190 100644 (file)
@@ -63,7 +63,7 @@ const char *get_libbpf_version(void)
        if (fp == NULL)
                goto out;
 
-       while ((s = fgets(buf, sizeof(buf), fp)) != NULL) {
+       while (fgets(buf, sizeof(buf), fp) != NULL) {
                if ((s = strstr(buf, "libbpf.so.")) != NULL) {
                        strncpy(_libbpf_version, s+10, sizeof(_libbpf_version)-1);
                        strtok(_libbpf_version, "\n");