code-style: misc changes (#374)

* ensure static variables comes after non-static ones
* remove depreciated DATA32 type
* prefer `sizeof(expression)` over `sizeof(Type)`.
* silence a -Wsign warning
* {gif,webp} loader: use a pointer to reduce code-noise
* gif loader: allocate in one place

Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/374
Reviewed-by: TAAPArthur <taaparthur@noreply.codeberg.org>
This commit is contained in:
NRK
2022-10-19 14:46:22 +02:00
parent aa56aa2303
commit b11384a694
5 changed files with 51 additions and 57 deletions

View File

@ -145,7 +145,7 @@ void tns_init(tns_t *tns, fileinfo_t *tns_files, const int *cnt, int *sel, win_t
const char *homedir, *dsuffix = "";
if (cnt != NULL && *cnt > 0)
tns->thumbs = ecalloc(*cnt, sizeof(thumb_t));
tns->thumbs = ecalloc(*cnt, sizeof(*tns->thumbs));
else
tns->thumbs = NULL;
tns->files = tns_files;