mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 22:45:21 -04:00
[misc] add static_strcat & static_strcpy and use static_ calls wherever possible
* Also set Rufus next to 2.17 and fix a warning
This commit is contained in:
parent
5d371088cb
commit
90dc847e24
23 changed files with 121 additions and 120 deletions
10
src/stdfn.c
10
src/stdfn.c
|
@ -235,7 +235,7 @@ void GetWindowsVersion(void)
|
|||
BOOL ws;
|
||||
|
||||
nWindowsVersion = WINDOWS_UNDEFINED;
|
||||
safe_strcpy(WindowsVersionStr, sizeof(WindowsVersionStr), "Windows Undefined");
|
||||
static_strcpy(WindowsVersionStr, "Windows Undefined");
|
||||
|
||||
memset(&vi, 0, sizeof(vi));
|
||||
vi.dwOSVersionInfoSize = sizeof(vi);
|
||||
|
@ -329,9 +329,9 @@ void GetWindowsVersion(void)
|
|||
GetRegistryKeyStr(REGKEY_HKLM, "Microsoft\\Windows NT\\CurrentVersion\\CurrentBuildNumber", build_number, sizeof(build_number));
|
||||
if (build_number[0] != 0) {
|
||||
nWindowsBuildNumber = atoi(build_number); // Keep a global copy
|
||||
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), " (Build ");
|
||||
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), build_number);
|
||||
safe_strcat(WindowsVersionStr, sizeof(WindowsVersionStr), ")");
|
||||
static_strcat(WindowsVersionStr, " (Build ");
|
||||
static_strcat(WindowsVersionStr, build_number);
|
||||
static_strcat(WindowsVersionStr, ")");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -905,7 +905,7 @@ char* GetCurrentMUI(void)
|
|||
(pfLCIDToLocaleName(GetUserDefaultUILanguage(), wmui_str, LOCALE_NAME_MAX_LENGTH, 0) > 0) ) {
|
||||
wchar_to_utf8_no_alloc(wmui_str, mui_str, LOCALE_NAME_MAX_LENGTH);
|
||||
} else {
|
||||
safe_strcpy(mui_str, LOCALE_NAME_MAX_LENGTH, "en-US");
|
||||
static_strcpy(mui_str, "en-US");
|
||||
}
|
||||
return mui_str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue