]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - tools/testing/selftests/bpf/test_tag.c
bpf: use prefix_len in test_tag when reading fdinfo
[karo-tx-linux.git] / tools / testing / selftests / bpf / test_tag.c
index 6ab4793b3d16976260662f03268def3c7bb3a55f..5f7c602f47d17b5c39f5ce97c6e6a1ddc2534f64 100644 (file)
@@ -99,7 +99,7 @@ static void tag_from_fdinfo(int fd_prog, uint8_t *tag, uint32_t len)
        assert(fp);
 
        while (fgets(buff, sizeof(buff), fp)) {
-               if (strncmp(buff, "prog_tag:\t", len))
+               if (strncmp(buff, "prog_tag:\t", prefix_len))
                        continue;
                ret = hex2bin(tag, buff + prefix_len, len);
                break;