Re: [PATCH v2 1/3] selftests: coredump: Properly initialize pointer

From: ALOK TIWARI
Date: Fri Apr 11 2025 - 11:27:58 EST




On 11-04-2025 20:39, Nam Cao wrote:
/* Step 4: Make sure all stack pointer values are non-zero */
+ line = NULL;

such case it should initialize at declaration time.
better to move up char *test_dir, *line = NULL;

for (i = 0; -1 != getline(&line, &line_length, file); ++i) {
stack = strtoull(line, NULL, 10);
ASSERT_NE(stack, 0);
}


Thanks,
Alok