Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: remove error check for xrealloc()

xrealloc() never returns NULL as it is checked in the callee.

This is a left-over of commit d717f24d8c68 ("kconfig: add xrealloc()
helper").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+2 -6
+2 -6
scripts/kconfig/confdata.c
··· 289 289 #define LINE_GROWTH 16 290 290 static int add_byte(int c, char **lineptr, size_t slen, size_t *n) 291 291 { 292 - char *nline; 293 292 size_t new_size = slen + 1; 293 + 294 294 if (new_size > *n) { 295 295 new_size += LINE_GROWTH - 1; 296 296 new_size *= 2; 297 - nline = xrealloc(*lineptr, new_size); 298 - if (!nline) 299 - return -1; 300 - 301 - *lineptr = nline; 297 + *lineptr = xrealloc(*lineptr, new_size); 302 298 *n = new_size; 303 299 } 304 300