summaryrefslogtreecommitdiff
path: root/usr.bin/ctfconv
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-09-26 08:16:19 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-09-26 08:16:19 +0000
commit8663160e16577d2f3dbb571c319a7605abe30c6d (patch)
tree243fe06df951db2ace06651d21f8b46262629e8c /usr.bin/ctfconv
parent9a6113c5d3b818e2906f1b21899a38f3a3285e91 (diff)
Return the correct error value in generate().
From Mark Johnston, markj@FreeBSD
Diffstat (limited to 'usr.bin/ctfconv')
-rw-r--r--usr.bin/ctfconv/generate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ctfconv/generate.c b/usr.bin/ctfconv/generate.c
index 2a26ee69bb1..e19094fe231 100644
--- a/usr.bin/ctfconv/generate.c
+++ b/usr.bin/ctfconv/generate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: generate.c,v 1.3 2017/08/11 16:28:30 mpi Exp $ */
+/* $OpenBSD: generate.c,v 1.4 2017/09/26 08:16:18 mpi Exp $ */
/*
* Copyright (c) 2017 Martin Pieuchot
@@ -346,7 +346,7 @@ generate(const char *path, const char *label, int compress)
ssize_t ctflen;
struct ctf_header cth;
struct imcs imcs;
- int error, fd;
+ int error = 0, fd;
memset(&cth, 0, sizeof(cth));
@@ -408,7 +408,7 @@ generate(const char *path, const char *label, int compress)
close(fd);
free(ctfdata);
- return 0;
+ return error;
}
#ifdef ZLIB