Skip to content

Commit db8f251

Browse files
authored
Merge pull request #890 from ojeda/array-size
kallsyms: replace `sizeof` with `ARRAY_SIZE`
2 parents e0a3d79 + ce899f2 commit db8f251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kallsyms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static struct sym_entry *read_symbol(FILE *in)
216216

217217
rc = fscanf(in, "%llx %c %" _stringify(KSYM_NAME_LEN_BUFFER) "s\n", &addr, &type, name);
218218
if (rc != 3) {
219-
if (rc != EOF && fgets(name, sizeof(name), in) == NULL)
219+
if (rc != EOF && fgets(name, ARRAY_SIZE(name), in) == NULL)
220220
fprintf(stderr, "Read error or end of file.\n");
221221
return NULL;
222222
}

0 commit comments

Comments
 (0)