Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/wsmuxctl fix error handling if open() fails



details:   https://anonhg.NetBSD.org/src/rev/eece9b928ee1
branches:  trunk
changeset: 533696:eece9b928ee1
user:      drochner <drochner%NetBSD.org@localhost>
date:      Sun Jul 07 15:13:55 2002 +0000

description:
fix error handling if open() fails

diffstat:

 usr.sbin/wsmuxctl/wsmuxctl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r ee8201bdac6b -r eece9b928ee1 usr.sbin/wsmuxctl/wsmuxctl.c
--- a/usr.sbin/wsmuxctl/wsmuxctl.c      Sun Jul 07 15:09:52 2002 +0000
+++ b/usr.sbin/wsmuxctl/wsmuxctl.c      Sun Jul 07 15:13:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsmuxctl.c,v 1.4 2001/10/24 18:31:16 augustss Exp $ */
+/* $NetBSD: wsmuxctl.c,v 1.5 2002/07/07 15:13:55 drochner Exp $ */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -160,9 +160,9 @@
                        sprintf(buf, "%s%s", ctlpath, wsdev);
                        wsdev = buf;
                        wsfd = open(wsdev, O_WRONLY, 0);
-                       if (wsfd < 0)
-                               err(2, "%s", wsdev);
                }
+               if (wsfd < 0)
+                       err(2, "%s", wsdev);
        }
 
        if (list) {



Home | Main Index | Thread Index | Old Index