mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Cut some more strlcat calls
This commit is contained in:
parent
07f22270f7
commit
6e06f14180
@ -781,7 +781,7 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||
strftime_am_pm(tmp, sizeof(tmp), format_str, &time_info);
|
||||
str[ _len] = ' ';
|
||||
str[++_len] = '\0';
|
||||
strlcat(str, tmp, len);
|
||||
strlcpy(str + _len, tmp, len - _len);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log,
|
||||
sizeof(tmp));
|
||||
str[ _len] = ' ';
|
||||
str[++_len] = '\0';
|
||||
strlcat(str, tmp, len);
|
||||
strlcpy(str + _len, tmp, len - _len);
|
||||
return;
|
||||
case PLAYLIST_LAST_PLAYED_STYLE_YMD_HMS:
|
||||
default:
|
||||
|
@ -462,9 +462,7 @@ void rarch_log_file_init(
|
||||
time_t cur_time = time(NULL);
|
||||
|
||||
rtime_localtime(&cur_time, &tm_);
|
||||
strftime(timestamped_log_file_name, sizeof(timestamped_log_file_name), "retroarch__%Y_%m_%d__%H_%M_%S", &tm_);
|
||||
strlcat(timestamped_log_file_name, ".log",
|
||||
sizeof(timestamped_log_file_name));
|
||||
strftime(timestamped_log_file_name, sizeof(timestamped_log_file_name), "retroarch__%Y_%m_%d__%H_%M_%S.log", &tm_);
|
||||
}
|
||||
|
||||
/* If nothing has changed, do nothing */
|
||||
|
Loading…
Reference in New Issue
Block a user