efi_loader: merge adjacent sprintf()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 16 May 2019 05:37:22 +0000 (07:37 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 19 May 2019 06:10:10 +0000 (08:10 +0200)
In the implementation of the device path to text protocol join adjacent
sprintf() statements.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_device_path_to_text.c

index f3a95790766472323da24337d6c722d87c0089a9..96fd08971b73eb05c55fc5011664b28f68c8dd34 100644 (file)
@@ -79,9 +79,8 @@ static char *dp_acpi(char *s, struct efi_device_path *dp)
                struct efi_device_path_acpi_path *adp =
                        (struct efi_device_path_acpi_path *)dp;
 
-               s += sprintf(s, "Acpi(PNP%04X", EISA_PNP_NUM(adp->hid));
-               s += sprintf(s, ",%d", adp->uid);
-               s += sprintf(s, ")");
+               s += sprintf(s, "Acpi(PNP%04X,%d)", EISA_PNP_NUM(adp->hid),
+                            adp->uid);
                break;
        }
        default: