We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d6120c7 + 8cb442f commit 1a02246Copy full SHA for 1a02246
src/x86/linux/cpuinfo.c
@@ -83,8 +83,9 @@ struct proc_cpuinfo_parser_state {
83
static bool parse_line(
84
const char* line_start,
85
const char* line_end,
86
- struct proc_cpuinfo_parser_state state[restrict static 1],
+ void* context,
87
uint64_t line_number) {
88
+ struct proc_cpuinfo_parser_state* restrict state = context;
89
/* Empty line. Skip. */
90
if (line_start == line_end) {
91
return true;
@@ -215,5 +216,5 @@ bool cpuinfo_x86_linux_parse_proc_cpuinfo(
215
216
.processors = processors,
217
};
218
return cpuinfo_linux_parse_multiline_file(
- "/proc/cpuinfo", BUFFER_SIZE, (cpuinfo_line_callback)parse_line, &state);
219
+ "/proc/cpuinfo", BUFFER_SIZE, parse_line, &state);
220
}
0 commit comments