diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-10 09:51:15 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-10 09:54:21 +0300 |
commit | 8cb3b49e51469b9689bfa44b85349149e17699dc (patch) | |
tree | 04307341165e0ee87aca82190c760af241027c32 /source/blender/blenlib | |
parent | 489cb7fd7eb0ab4e34c084acd2bf740a878498e9 (diff) |
Cleanup: replace strncpy with BLI_strncpy
Also replace strncpy+strcat with BLI_string_join
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c index 781b38f713a..f7249e491d7 100644 --- a/source/blender/blenlib/intern/system.c +++ b/source/blender/blenlib/intern/system.c @@ -154,12 +154,12 @@ void BLI_hostname_get(char *buffer, size_t bufsize) if (gethostname(buffer, bufsize - 1) < 0) { BLI_strncpy(buffer, "-unknown-", bufsize); } - /* When gethostname() truncates, it doesn't guarantee the trailing \0. */ + /* When `gethostname()` truncates, it doesn't guarantee the trailing `\0`. */ buffer[bufsize - 1] = '\0'; #else DWORD bufsize_inout = bufsize; if (!GetComputerName(buffer, &bufsize_inout)) { - strncpy(buffer, "-unknown-", bufsize); + BLI_strncpy(buffer, "-unknown-", bufsize); } #endif } |