Simplifications

This commit is contained in:
twinaphex 2018-01-31 23:13:47 +01:00
parent 7cf4763bfb
commit e81ee5f0cb

View File

@ -493,7 +493,7 @@ char *find_last_slash(const char *str)
**/ **/
void fill_pathname_slash(char *path, size_t size) void fill_pathname_slash(char *path, size_t size)
{ {
size_t path_len = strlen(path); size_t path_len = strlen(path);
const char *last_slash = find_last_slash(path); const char *last_slash = find_last_slash(path);
/* Try to preserve slash type. */ /* Try to preserve slash type. */
@ -679,9 +679,10 @@ void fill_str_dated_filename(char *out_filename,
format[0] = '\0'; format[0] = '\0';
strftime(format, sizeof(format), "-%y%m%d-%H%M%S.", localtime(&cur_time)); strftime(format, sizeof(format), "-%y%m%d-%H%M%S.", localtime(&cur_time));
strlcpy(out_filename, in_str, size);
strlcat(out_filename, format, size); fill_pathname_join_concat_noext(out_filename,
strlcat(out_filename, ext, size); in_str, format, ext,
size);
} }
/** /**