ryantimwilson / rpms / systemd

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