teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0299-cryptsetup-use-unabbrieviated-variable-names.patch

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