1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Remove useless casts of vsnprintf() return value.

The return value is not checked because we are happy with a truncated result in this case, which is guaranteed by passing the buffer size.

Found on MacOS M1.
This commit is contained in:
David Steele
2021-01-21 17:26:12 -05:00
parent 6a992a5884
commit 3f72eca909

View File

@@ -114,7 +114,7 @@ hrnCfgArgRawFmt(StringList *argList, ConfigOption optionId, const char *format,
va_list argument;
va_start(argument, format);
(size_t)vsnprintf(buffer, sizeof(buffer) - 1, format, argument);
vsnprintf(buffer, sizeof(buffer) - 1, format, argument);
va_end(argument);
hrnCfgArgKeyRawZ(argList, optionId, 1, buffer);
@@ -127,7 +127,7 @@ hrnCfgArgKeyRawFmt(StringList *argList, ConfigOption optionId, unsigned optionKe
va_list argument;
va_start(argument, format);
(size_t)vsnprintf(buffer, sizeof(buffer) - 1, format, argument);
vsnprintf(buffer, sizeof(buffer) - 1, format, argument);
va_end(argument);
hrnCfgArgKeyRawZ(argList, optionId, optionKey, buffer);