selftests/resctrl: Enable gcc checks to detect buffer overflows
[linux-2.6-microblaze.git] / tools / testing / selftests / resctrl / cqm_test.c
index c875615..5e7308a 100644 (file)
@@ -86,7 +86,7 @@ static int check_results(struct resctrl_val_param *param, int no_of_bits)
                return errno;
        }
 
-       while (fgets(temp, 1024, fp)) {
+       while (fgets(temp, sizeof(temp), fp)) {
                char *token = strtok(temp, ":\t");
                int fields = 0;