b9a53a
From 0577d8378645c1ecd909b74403cefe31ed569398 Mon Sep 17 00:00:00 2001
b9a53a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
b9a53a
Date: Thu, 1 Aug 2019 08:13:13 +0200
b9a53a
Subject: [PATCH] cryptsetup: use unabbrieviated variable names
b9a53a
b9a53a
Now that "ret_" has been added to the output variables, we can name
b9a53a
the internal variables without artificial abbrevs.
b9a53a
b9a53a
(cherry picked from commit 5d2100dc4c32abbce4109e75cbfbbef6e1b2b7b1)
b9a53a
b9a53a
Related: #1763155
b9a53a
---
b9a53a
 src/cryptsetup/cryptsetup-generator.c | 26 +++++++++++++-------------
b9a53a
 1 file changed, 13 insertions(+), 13 deletions(-)
b9a53a
b9a53a
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
b9a53a
index 1e8e3ba00d..7b234e37be 100644
b9a53a
--- a/src/cryptsetup/cryptsetup-generator.c
b9a53a
+++ b/src/cryptsetup/cryptsetup-generator.c
b9a53a
@@ -40,30 +40,30 @@ static Hashmap *arg_disks = NULL;
b9a53a
 static char *arg_default_options = NULL;
b9a53a
 static char *arg_default_keyfile = NULL;
b9a53a
 
b9a53a
-static int split_keyspec(const char *keyspec, char **keyfile, char **keydev) {
b9a53a
-        _cleanup_free_ char *kfile = NULL, *kdev = NULL;
b9a53a
-        char *c;
b9a53a
+static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_keydev) {
b9a53a
+        _cleanup_free_ char *keyfile = NULL, *keydev = NULL;
b9a53a
+        const char *c;
b9a53a
 
b9a53a
         assert(keyspec);
b9a53a
-        assert(keyfile);
b9a53a
-        assert(keydev);
b9a53a
+        assert(ret_keyfile);
b9a53a
+        assert(ret_keydev);
b9a53a
 
b9a53a
         c = strrchr(keyspec, ':');
b9a53a
         if (c) {
b9a53a
-                kfile = strndup(keyspec, c-keyspec);
b9a53a
-                kdev = strdup(c + 1);
b9a53a
-                if (!*kfile || !*kdev)
b9a53a
+                keyfile = strndup(keyspec, c-keyspec);
b9a53a
+                keydev = strdup(c + 1);
b9a53a
+                if (!keyfile || !keydev)
b9a53a
                         return log_oom();
b9a53a
         } else {
b9a53a
                 /* No keydev specified */
b9a53a
-                kfile = strdup(keyspec);
b9a53a
-                kdev = NULL;
b9a53a
-                if (!*kfile)
b9a53a
+                keyfile = strdup(keyspec);
b9a53a
+                keydev = NULL;
b9a53a
+                if (!keyfile)
b9a53a
                         return log_oom();
b9a53a
         }
b9a53a
 
b9a53a
-        *keyfile = TAKE_PTR(kfile);
b9a53a
-        *keydev = TAKE_PTR(kdev);
b9a53a
+        *ret_keyfile = TAKE_PTR(keyfile);
b9a53a
+        *ret_keydev = TAKE_PTR(keydev);
b9a53a
 
b9a53a
         return 0;
b9a53a
 }