summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-01-27 20:12:33 +0200
committerPetr Mladek <pmladek@suse.com>2022-02-10 13:16:50 +0100
commitf74a08fc61073cc5b5f4e24eb513f0b79f4f6ce7 (patch)
tree163c3d632e247b7018dd727089928d2dd111a4dd /lib/vsprintf.c
parentd75b26f880f60ead301e79ba0f4a635c5a60767f (diff)
vsprintf: Move space out of string literals in fourcc_string()
The literals "big-endian" and "little-endian" may be potentially occurred in other places. Dropping space allows linker to merge them by using only a single copy. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20220127181233.72910-2-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 3e416a3cb66d..f96c66899df6 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -1790,7 +1790,8 @@ char *fourcc_string(char *buf, char *end, const u32 *fourcc,
*p++ = isascii(c) && isprint(c) ? c : '.';
}
- strcpy(p, orig & BIT(31) ? " big-endian" : " little-endian");
+ *p++ = ' ';
+ strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
p += strlen(p);
*p++ = ' ';