From: Lucas De Marchi Date: Sat, 30 Nov 2024 16:22:26 +0000 (-0600) Subject: libkmod/zlib: s/err/ret/ for consistency X-Git-Tag: v34~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb84dcfcdfe0c160ea2c84ce69c935153176bcd7;p=thirdparty%2Fkmod.git libkmod/zlib: s/err/ret/ for consistency Use the libkmod-file-xz.c as reference, keeping similar variable names so it's easy to share code. Signed-off-by: Lucas De Marchi Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/262 --- diff --git a/libkmod/libkmod-file-zlib.c b/libkmod/libkmod-file-zlib.c index 478a8c80..a7e27b80 100644 --- a/libkmod/libkmod-file-zlib.c +++ b/libkmod/libkmod-file-zlib.c @@ -23,7 +23,7 @@ int kmod_file_load_zlib(struct kmod_file *file) { _cleanup_free_ unsigned char *p = NULL; - int err = 0; + int ret = 0; off_t did = 0, total = 0; gzFile gzf; int gzfd; @@ -45,7 +45,7 @@ int kmod_file_load_zlib(struct kmod_file *file) if (did == total) { void *tmp = realloc(p, total + READ_STEP); if (tmp == NULL) { - err = -errno; + ret = -errno; goto error; } total += READ_STEP; @@ -62,7 +62,7 @@ int kmod_file_load_zlib(struct kmod_file *file) ERR(file->ctx, "gzip: %s\n", gz_errmsg); /* gzip might not set errno here */ - err = gzerr == Z_ERRNO ? -errno : -EINVAL; + ret = gzerr == Z_ERRNO ? -errno : -EINVAL; goto error; } did += r; @@ -76,5 +76,5 @@ int kmod_file_load_zlib(struct kmod_file *file) error: gzclose(gzf); /* closes the gzfd */ - return err; + return ret; }