From 8663160e16577d2f3dbb571c319a7605abe30c6d Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Tue, 26 Sep 2017 08:16:19 +0000 Subject: Return the correct error value in generate(). From Mark Johnston, markj@FreeBSD --- usr.bin/ctfconv/generate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/ctfconv') 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 -- cgit v1.2.3