summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2011-09-20 18:35:24 +0000
committerratchov <ratchov@openbsd.org>2011-09-20 18:35:24 +0000
commit6e4028129c08ed92f5713ebb25ae34a8f136026e (patch)
tree2931b0775fbe1c4077e57eab215262c9ce38f21b
parentPrepare to add support ALPS touchpads (diff)
downloadwireguard-openbsd-6e4028129c08ed92f5713ebb25ae34a8f136026e.tar.xz
wireguard-openbsd-6e4028129c08ed92f5713ebb25ae34a8f136026e.zip
Don't include fcntl.h (not needed anymore) and use errx(3) instead of
fprintf(3) and exit(3). from Michael W. Bombardieri <mwb at bom.nom.co>, thanks!
-rw-r--r--usr.bin/midiplay/midiplay.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/midiplay/midiplay.c b/usr.bin/midiplay/midiplay.c
index 722d1388b1a..9ff7e1e82b4 100644
--- a/usr.bin/midiplay/midiplay.c
+++ b/usr.bin/midiplay/midiplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: midiplay.c,v 1.13 2011/04/28 07:23:46 ratchov Exp $ */
+/* $OpenBSD: midiplay.c,v 1.14 2011/09/20 18:35:24 ratchov Exp $ */
/* $NetBSD: midiplay.c,v 1.8 1998/11/25 22:17:07 augustss Exp $ */
/*
@@ -36,7 +36,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
-#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <string.h>
@@ -448,10 +447,8 @@ main(int argc, char **argv)
argv += optind;
hdl = mio_open(file, MIO_OUT, 0);
- if (hdl == NULL) {
- fprintf(stderr, "failed to open MIDI output\n");
- exit(1);
- }
+ if (hdl == NULL)
+ errx(1, "failed to open MIDI output");
if (gmreset)
midireset();