]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
remove no longer needed braces
authorCristian Rodríguez <crrodriguez@opensuse.org>
Sat, 21 Jan 2023 18:19:28 +0000 (18:19 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jan 2023 12:52:00 +0000 (13:52 +0100)
libblkid/src/devno.c
misc-utils/blkid.c
term-utils/agetty.c

index d35c807da2db0a61f93750af3595c8ae6d96aa49..a1ab54362fce463f4f6d46b8d830a295b0fa0258 100644 (file)
@@ -52,15 +52,12 @@ static char *blkid_strconcat(const char *a, const char *b, const char *c)
        p = res = malloc(len + 1);
        if (!res)
                return NULL;
-       if (al) {
+       if (al)
                p = mempcpy(p, a, al);
-       }
-       if (bl) {
+       if (bl)
                p = mempcpy(p, b, bl);
-       }
-       if (cl) {
+       if (cl)
                p = mempcpy(p, c, cl);
-       }
        *p = '\0';
        return res;
 }
index ef089a8ca312c31d04de695a24f078951fcddd63..32bc6feeadc23facc98537d38e683e596a645651 100644 (file)
@@ -402,12 +402,11 @@ static int append_str(char **res, size_t *sz, const char *a, const char *b)
        *res = str = xrealloc(str, len + 1);
        str += *sz;
 
-       if (a) {
+       if (a)
                str = mempcpy(str, a, asz);
-       }
-       if (b) {
+       if (b)
                str = mempcpy(str, b, bsz);
-       }
+
        *str = '\0';
        *sz = len;
        return 0;
index d84047531218605607a65f9aa9ac9a19cc012b28..49935c8d9520e514abe91b8721eadc90bdfe3aac 100644 (file)
@@ -616,14 +616,13 @@ static char *replace_u(char *str, char *username)
                if (!tp)
                        log_err(_("failed to allocate memory: %m"));
 
-               if (p != str) {
+               if (p != str)
                        /* copy chars before \u */
                        tp = mempcpy(tp, str, p - str);
-               }
-               if (usz) {
+               if (usz)
                        /* copy username */
                        tp = mempcpy(tp, username, usz);
-               }
+
                if (*(p + 2))
                        /* copy chars after \u + \0 */
                        memcpy(tp, p + 2, sz - (p - str) - 1);