Skip to content

Commit f74a08f

Browse files
andy-shevpmladek
authored andcommitted
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 <[email protected]> Acked-by: Sakari Ailus <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d75b26f commit f74a08f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/vsprintf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,8 @@ char *fourcc_string(char *buf, char *end, const u32 *fourcc,
17901790
*p++ = isascii(c) && isprint(c) ? c : '.';
17911791
}
17921792

1793-
strcpy(p, orig & BIT(31) ? " big-endian" : " little-endian");
1793+
*p++ = ' ';
1794+
strcpy(p, orig & BIT(31) ? "big-endian" : "little-endian");
17941795
p += strlen(p);
17951796

17961797
*p++ = ' ';

0 commit comments

Comments
 (0)