aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2022-10-19 14:46:22 +0200
committerNRK <nrk@disroot.org>2022-10-19 14:46:22 +0200
commitb11384a6942cdf3c6b6f55e0dcc0a438eff7158a (patch)
tree68aefd1be3dc6fe83384c1cba6e951c7ca9aa816 /thumbs.c
parentaa56aa23030e9f8680d5ef366f2bd72fd342c14f (diff)
downloadnsxiv-b11384a6942cdf3c6b6f55e0dcc0a438eff7158a.tar.zst
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>
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thumbs.c b/thumbs.c
index 40a3d93..c9e97c4 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -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;