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 authored and Serge Hallyn committed 2023-05-26 16:03:27 -05:00
1 parent e73a2194b3
commit dcc90658fd
1 file changed
+1 -3
+1 -3
View File
@@ -81,9 +81,7 @@
} }
if (ERANGE != status) { if (ERANGE != status) {
free (buffer); break;
free (result);
return NULL;
} }
if (length <= ((size_t)-1 / 4)) { if (length <= ((size_t)-1 / 4)) {