summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common.h b/src/common.h
index eaa0743..cfc4a72 100644
--- a/src/common.h
+++ b/src/common.h
@@ -29,7 +29,7 @@ void *xrealloc(void *ptr, size_t size);
#define F_LOAD_FILE_ALIGNED(T) \
static int load_file_##T##_aligned( \
- char *path, size_t *size, u32 *buf) \
+ char *path, size_t *size, T *buf) \
{ \
int ret = 1; \
\
@@ -41,7 +41,7 @@ void *xrealloc(void *ptr, size_t size);
\
fseek(fp, 0, SEEK_END); \
*size = (size_t)ftell(fp); \
- *size += (*size % sizeof(u32)); \
+ *size += (*size % sizeof(T)); \
\
if(buf == NULL) { \
ret = 0; \
@@ -49,7 +49,7 @@ void *xrealloc(void *ptr, size_t size);
} \
\
fseek(fp, 0, SEEK_SET); \
- fread(buf, sizeof(u32), *size/sizeof(u32), fp); \
+ fread(buf, sizeof(T), *size/sizeof(T), fp); \
\
ret = 0; \
exit: \