This commit is contained in:
twinaphex 2014-09-16 06:01:49 +02:00
parent 5188b3cc56
commit 4550f3707b
2 changed files with 3 additions and 13 deletions

View File

@ -64,11 +64,9 @@ static int qstrcmp_dir(const void *a_, const void *b_)
void dir_list_sort(struct string_list *list, bool dir_first)
{
if (!list)
return;
qsort(list->elems, list->size, sizeof(struct string_list_elem),
dir_first ? qstrcmp_dir : qstrcmp_plain);
if (list)
qsort(list->elems, list->size, sizeof(struct string_list_elem),
dir_first ? qstrcmp_dir : qstrcmp_plain);
}
void dir_list_free(struct string_list *list)

View File

@ -123,15 +123,11 @@ long read_compressed_file(const char * path, void **buf)
const char* file_ext = path_get_extension(archive_path);
#ifdef HAVE_7ZIP
if (strcasecmp(file_ext,"7z") == 0)
{
return read_7zip_file(archive_path,archive_found,buf);
}
#endif
#ifdef HAVE_ZLIB
if (strcasecmp(file_ext,"zip") == 0)
{
return read_zip_file(archive_path,archive_found,buf);
}
#endif
return -1;
}
@ -654,8 +650,6 @@ void fill_pathname_expand_special(char *out_path,
void fill_short_pathname_representation(char* out_rep,
const char *in_path, size_t size)
{
char path_short[PATH_MAX];
fill_pathname(path_short, path_basename(in_path), "",
sizeof(path_short));
@ -674,9 +668,7 @@ void fill_short_pathname_representation(char* out_rep,
strlcpy(out_rep,last_hash + 1, size);
}
else
{
strlcpy(out_rep,path_short, size);
}
}