From eefcd0e99faed5f2595ae109cfdf84824cc51615 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 20 Sep 2020 00:12:54 +0200 Subject: [PATCH] Use strcpy_literal in more places --- frontend/drivers/platform_win32.c | 38 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index e0ca55b3c4..4a940f767f 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -330,36 +330,36 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) { case 10: if (server) - strlcpy(s, "Windows Server 2016", len); + strcpy_literal(s, "Windows Server 2016"); else - strlcpy(s, "Windows 10", len); + strcpy_literal(s, "Windows 10"); break; case 6: switch (vi.dwMinorVersion) { case 3: if (server) - strlcpy(s, "Windows Server 2012 R2", len); + strcpy_literal(s, "Windows Server 2012 R2"); else - strlcpy(s, "Windows 8.1", len); + strcpy_literal(s, "Windows 8.1"); break; case 2: if (server) - strlcpy(s, "Windows Server 2012", len); + strcpy_literal(s, "Windows Server 2012"); else - strlcpy(s, "Windows 8", len); + strcpy_literal(s, "Windows 8"); break; case 1: if (server) - strlcpy(s, "Windows Server 2008 R2", len); + strcpy_literal(s, "Windows Server 2008 R2"); else - strlcpy(s, "Windows 7", len); + strcpy_literal(s, "Windows 7"); break; case 0: if (server) - strlcpy(s, "Windows Server 2008", len); + strcpy_literal(s, "Windows Server 2008"); else - strlcpy(s, "Windows Vista", len); + strcpy_literal(s, "Windows Vista"); break; default: break; @@ -371,7 +371,7 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) case 2: if (server) { - strlcpy(s, "Windows Server 2003", len); + strcpy_literal(s, "Windows Server 2003"); if (GetSystemMetrics(SM_SERVERR2)) strlcat(s, " R2", len); } @@ -379,14 +379,14 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) { /* Yes, XP Pro x64 is a higher version number than XP x86 */ if (string_is_equal(arch, "x64")) - strlcpy(s, "Windows XP", len); + strcpy_literal(s, "Windows XP"); } break; case 1: - strlcpy(s, "Windows XP", len); + strcpy_literal(s, "Windows XP"); break; case 0: - strlcpy(s, "Windows 2000", len); + strcpy_literal(s, "Windows 2000"); break; } break; @@ -395,17 +395,17 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor) { case 0: if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) - strlcpy(s, "Windows 95", len); + strcpy_literal(s, "Windows 95"); else if (vi.dwPlatformId == VER_PLATFORM_WIN32_NT) - strlcpy(s, "Windows NT 4.0", len); + strcpy_literal(s, "Windows NT 4.0"); else - strlcpy(s, "Unknown", len); + strcpy_literal(s, "Unknown"); break; case 90: - strlcpy(s, "Windows ME", len); + strcpy_literal(s, "Windows ME"); break; case 10: - strlcpy(s, "Windows 98", len); + strcpy_literal(s, "Windows 98"); break; } break;