From 30d1c9b30b5642efcba66bdc7956f4d7e321fc97 Mon Sep 17 00:00:00 2001 From: kartofen Date: Thu, 11 Aug 2022 21:45:03 +0300 Subject: more used friendly --- src/ppm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ppm.c') diff --git a/src/ppm.c b/src/ppm.c index 7952305..57a402b 100644 --- a/src/ppm.c +++ b/src/ppm.c @@ -29,7 +29,7 @@ void save_as_ppm(char* file_path, small_t *t, size_t width, size_t height, size_ fclose(fp); } -small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) +char *load_from_ppm(char *file_path, size_t *width, size_t *height) { FILE *fp = fopen(file_path, "rb"); if(!fp) { @@ -55,7 +55,7 @@ small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) exit(1); } - small_t *t = malloc((*width) * (*height ) * 3); + char *t = malloc((*width) * (*height ) * 3); fread(t, *width*3, *height, fp); @@ -64,7 +64,7 @@ small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) return t; } -void free_ppm(small_t *t) +void free_ppm(char *t) { free(t); } -- cgit v1.2.3