xgetXXbyYY: Avoid duplicated error handling block

The error handling is performed after the loop. By just calling break it
is possible to reuse the error handling if status is not ERANGE.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
This commit is contained in:
Samanta Navarro 2023-05-15 11:59:23 +00:00 committed by Serge Hallyn
parent e73a2194b3
commit dcc90658fd
1 changed files with 1 additions and 3 deletions

View File

@ -81,9 +81,7 @@
}
if (ERANGE != status) {
free (buffer);
free (result);
return NULL;
break;
}
if (length <= ((size_t)-1 / 4)) {