summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Claudi <aclaudi@redhat.com>2021-08-07 18:58:02 +0200
committerStephen Hemminger <stephen@networkplumber.org>2021-08-10 20:01:54 -0700
commitd1eacf12b58eb9907dc071f32238388ef3e254c0 (patch)
tree67f88ef9906e55999f73e74f5a31527f0b318aab
parent50a412702252ba29524b860df6c30d14f03cd34a (diff)
downloadiproute2-d1eacf12b58eb9907dc071f32238388ef3e254c0.tar.gz
lib: bpf_glue: remove useless assignment
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>
-rw-r--r--lib/bpf_glue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bpf_glue.c b/lib/bpf_glue.c
index eaa9504f..70d00184 100644
--- a/lib/bpf_glue.c
+++ b/lib/bpf_glue.c
@@ -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");