diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-10-14 15:30:06 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-17 08:05:05 +0200 |
commit | 06648fa99189014885fe26cac00d4b4fcfbdeef9 (patch) | |
tree | 883b95f792d1a723a1933971b90d5067b433d878 /src/gpt-auto-generator | |
parent | 346a4e3db8a7a6df32c51b48bb84ecbbd6d9bb6a (diff) | |
download | systemd-06648fa99189014885fe26cac00d4b4fcfbdeef9.tar.gz |
gpt-auto-generator: use our usual ret_xyz parameter naming
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 5584eb22af..7df75e1333 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -42,7 +42,13 @@ static bool arg_enabled = true; static bool arg_root_enabled = true; static int arg_root_rw = -1; -static int add_cryptsetup(const char *id, const char *what, bool rw, bool require, char **device) { +static int add_cryptsetup( + const char *id, + const char *what, + bool rw, + bool require, + char **ret_device) { + #if HAVE_LIBCRYPTSETUP _cleanup_free_ char *e = NULL, *n = NULL, *d = NULL; _cleanup_fclose_ FILE *f = NULL; @@ -110,14 +116,14 @@ static int add_cryptsetup(const char *id, const char *what, bool rw, bool requir if (r < 0) log_warning_errno(r, "Failed to write device timeout drop-in, ignoring: %m"); - if (device) { - char *ret; + if (ret_device) { + char *s; - ret = path_join("/dev/mapper", id); - if (!ret) + s = path_join("/dev/mapper", id); + if (!s) return log_oom(); - *device = ret; + *ret_device = s; } return 0; |