diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-21 23:47:36 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-01-21 23:47:36 +0000 |
commit | 5b03280a870e2bd599f4b05fdf43cf3a2f8f829c (patch) | |
tree | 744fba17310b81bc1f7975cae2f8eae6a8e1502f | |
parent | 5b2c6c8403760622408244c7ab09fe3be78a2a80 (diff) |
there's a "slight" difference between our log_err() and the system's err()...
the latter does not return, so we don't need to exit() afterwards.
one of the two spotted by jared
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index 794fd72788d..5bea9cd2718 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.33 2004/01/21 23:45:18 henning Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.34 2004/01/21 23:47:35 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -81,18 +81,14 @@ main(int argc, char *argv[]) if ((res = parse(argc, argv)) == NULL) exit(1); - if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { + if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) err(1, "control_init: socket"); - exit(1); - } bzero(&sun, sizeof(sun)); sun.sun_family = AF_UNIX; strlcpy(sun.sun_path, SOCKET_NAME, sizeof(sun.sun_path)); - if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) { + if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) err(1, "connect: %s", SOCKET_NAME); - exit(1); - } imsg_init(&ibuf, fd); done = 0; |