diff options
author | 2010-08-20 06:56:53 +0000 | |
---|---|---|
committer | 2010-08-20 06:56:53 +0000 | |
commit | d3029f245a5a905d061ea6e267b92a18adeae536 (patch) | |
tree | 867c9d800e7a509c7a571a4108bc8d09e845b328 /lib/libsndio | |
parent | white space fix (diff) | |
download | wireguard-openbsd-d3029f245a5a905d061ea6e267b92a18adeae536.tar.xz wireguard-openbsd-d3029f245a5a905d061ea6e267b92a18adeae536.zip |
polish the code: remove few unused #includes, add missing ones,
fix NULL vs 0, etc. No behaviour change.
Diffstat (limited to 'lib/libsndio')
-rw-r--r-- | lib/libsndio/sndio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libsndio/sndio.c b/lib/libsndio/sndio.c index 8f7e4b9e08c..075e1779534 100644 --- a/lib/libsndio/sndio.c +++ b/lib/libsndio/sndio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sndio.c,v 1.25 2010/04/24 06:15:54 ratchov Exp $ */ +/* $OpenBSD: sndio.c,v 1.26 2010/08/20 06:56:53 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov <alex@caoua.org> * @@ -197,7 +197,10 @@ sio_open(const char *str, unsigned mode, int nbio) minor(sb.st_rdev) & 0xf); } else strlcpy(buf, "0", sizeof(buf)); - return sio_open_sun(buf, mode, nbio); + hdl = sio_open_sun(buf, mode, nbio); + if (hdl != NULL) + return hdl; + return NULL; } sep = strchr(str, ':'); if (sep == NULL) { |