Introduction
Introduction Statistics Contact Development Disclaimer Help
Small changes in the png-utils - farbfeld - suckless image format with conversi…
git clone git://git.suckless.org/farbfeld
Log
Files
Refs
README
LICENSE
---
commit 98dbe21bcb83fead026c295329ad2a55d8eff1b5
parent b1868127e4102b2e073750c7f55fd445bee028be
Author: FRIGN <[email protected]>
Date: Wed, 6 Jan 2016 12:29:36 +0100
Small changes in the png-utils
forgot to include setjmp.h. also correct the malloc error-messageSmall
Diffstat:
M ff2png.c | 4 ++--
M png2ff.c | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/ff2png.c b/ff2png.c
@@ -2,6 +2,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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
@@ -2,6 +2,7 @@
#include <arpa/inet.h>
#include <errno.h>
+#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.