diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-26 18:07:34 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-26 18:07:34 +0000 |
commit | 813e6af054fdcbfbf7a2222b80c873ba29a90e6e (patch) | |
tree | a866d018b981329f2a548dde61687e4de4e5ba57 /usr.sbin/bgpd/config.c | |
parent | 4af14c2d6f67af52937f1107de654c59989429ed (diff) |
when this project started and i added the fatal() function, I made it take
the error number as parameter instead of accessing errno, because in one
place the error number was not in errno but fetched from a socket.
now, of course it makes much more sense to just set errno to the error number
just fecthed in this one place instead of having hundreds of fatal() calls
all transfer the errno round and round and round...
fix this, and also provide a fatalx, which does not care for errno and doesn't
invoke strerror.
oh, btw, in the place where we fetch the err # from the socket, we don't
call fatal anymore anyway...
Diffstat (limited to 'usr.sbin/bgpd/config.c')
-rw-r--r-- | usr.sbin/bgpd/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/config.c b/usr.sbin/bgpd/config.c index 667b7e121b7..a7f6172fc18 100644 --- a/usr.sbin/bgpd/config.c +++ b/usr.sbin/bgpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.7 2003/12/25 17:35:53 henning Exp $ */ +/* $OpenBSD: config.c,v 1.8 2003/12/26 18:07:32 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -108,7 +108,7 @@ get_bgpid(void) localnet = inet_addr("127.0.0.0"); if (getifaddrs(&ifap) == -1) - fatal("getifaddrs", errno); + fatal("getifaddrs"); for (ifa = ifap; ifa; ifa = ifa->ifa_next) { if (ifa->ifa_addr->sa_family != AF_INET) |