From 851e4288c102cc4177d54d87aded43d003e85885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 28 Oct 2015 22:29:01 +0100 Subject: Prefix safe allocation functions with 'e' instead of 's_' --- thumbs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'thumbs.c') diff --git a/thumbs.c b/thumbs.c index 949dac9..4790ed9 100644 --- a/thumbs.c +++ b/thumbs.c @@ -48,7 +48,7 @@ char* tns_cache_filepath(const char *filepath) if (strncmp(filepath, cache_dir, strlen(cache_dir)) != 0) { /* don't cache images inside the cache directory! */ len = strlen(cache_dir) + strlen(filepath) + 2; - cfile = (char*) s_malloc(len); + cfile = (char*) emalloc(len); snprintf(cfile, len, "%s/%s", cache_dir, filepath + 1); } return cfile; @@ -155,7 +155,7 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel, const char *homedir, *dsuffix = ""; if (cnt != NULL && *cnt > 0) { - tns->thumbs = (thumb_t*) s_malloc(*cnt * sizeof(thumb_t)); + tns->thumbs = (thumb_t*) emalloc(*cnt * sizeof(thumb_t)); memset(tns->thumbs, 0, *cnt * sizeof(thumb_t)); } else { tns->thumbs = NULL; @@ -178,7 +178,7 @@ void tns_init(tns_t *tns, fileinfo_t *files, const int *cnt, int *sel, if (homedir != NULL) { free(cache_dir); len = strlen(homedir) + strlen(dsuffix) + 6; - cache_dir = (char*) s_malloc(len); + cache_dir = (char*) emalloc(len); snprintf(cache_dir, len, "%s%s/sxiv", homedir, dsuffix); } else { warn("could not locate thumbnail cache directory"); -- cgit v1.2.3