mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 04:56:00 +01:00
Remove useless g_strdup
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
25b276246b
commit
d3612f3c9b
1 changed files with 2 additions and 4 deletions
|
@ -175,12 +175,10 @@ list_files_for_cc(zathura_t* zathura, const char* input, bool check_file_ext, in
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get current path */
|
/* get current path */
|
||||||
char* tmp = g_strdup(path);
|
current_path = is_dir ? g_strdup(path) : g_path_get_dirname(path);
|
||||||
current_path = is_dir ? g_strdup(tmp) : g_strdup(dirname(tmp));
|
|
||||||
g_free(tmp);
|
|
||||||
|
|
||||||
/* get current file */
|
/* get current file */
|
||||||
gchar* current_file = is_dir ? "" : basename(path);
|
gchar* current_file = is_dir ? "" : basename(path);
|
||||||
const size_t current_file_length = strlen(current_file);
|
const size_t current_file_length = strlen(current_file);
|
||||||
|
|
||||||
/* read directory */
|
/* read directory */
|
||||||
|
|
Loading…
Reference in a new issue