[hackers] [farbfeld] Small changes in the png-utils || FRIGN
commit 98dbe21bcb83fead026c295329ad2a55d8eff1b5
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Wed Jan 6 12:29:36 2016 +0100
Commit: FRIGN <dev_AT_frign.de>
CommitDate: Wed Jan 6 12:29:36 2016 +0100
Small changes in the png-utils
forgot to include setjmp.h. also correct the malloc error-messageSmall
diff --git a/ff2png.c b/ff2png.c
index 548c7dd..62a00f2 100644
--- a/ff2png.c
+++ b/ff2png.c
_AT_@ -2,6 +2,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
_AT_@ -59,8 +60,7 @@ main(int argc, char *argv[])
/* write rows */
png_row_len = strlen("RGBA") * width * sizeof(uint16_t);
if (!(png_row = malloc(png_row_len))) {
- fprintf(stderr, "%s: malloc: ", argv[0]);
- perror(NULL);
+ fprintf(stderr, "%s: malloc: out of memory\n", argv[0]);
return 1;
}
for (i = 0; i < height; ++i) {
diff --git a/png2ff.c b/png2ff.c
index 4f4fc83..5a5da6c 100644
--- a/png2ff.c
+++ b/png2ff.c
_AT_@ -2,6 +2,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
Received on Wed Jan 06 2016 - 12:33:12 CET
This archive was generated by hypermail 2.3.0
: Wed Jan 06 2016 - 12:36:13 CET