From 7a2b4165e4801202038e905587e99ebdd7d64e92 Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 8 Jan 2014 16:16:44 +0000 Subject: [PATCH] err() not errx() when fopen fails. --- bin/md5/md5.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/md5/md5.c b/bin/md5/md5.c index 6606593d245..0e5f10526ed 100644 --- a/bin/md5/md5.c +++ b/bin/md5/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.62 2014/01/08 16:13:11 millert Exp $ */ +/* $OpenBSD: md5.c,v 1.63 2014/01/08 16:16:44 millert Exp $ */ /* * Copyright (c) 2001,2003,2005-2007,2010,2013,2014 @@ -307,6 +307,11 @@ main(int argc, char **argv) case 'c': cflag = 1; break; + case 'h': + ofile = fopen(optarg, "w"); + if (ofile == NULL) + err(1, "%s", optarg); + break; #if !defined(SMALL) case 'o': if (strcmp(optarg, "1") == 0) @@ -326,11 +331,6 @@ main(int argc, char **argv) hash_insert(&hl, hf, 0); break; #endif /* !defined(SMALL) */ - case 'h': - ofile = fopen(optarg, "w"); - if (ofile == NULL) - errx(1, "%s", optarg); - break; case 'p': pflag = 1; break; -- 2.20.1