/*
netutl.c -- some supporting network utility code
Copyright (C) 1998-2005 Ivo Timmermans
- 2000-2009 Guus Sliepen <guus@tinc-vpn.org>
+ 2000-2011 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if(err) {
logger(LOG_ERR, "Error while translating addresses: %s",
gai_strerror(err));
- raise(SIGFPE);
- exit(0);
+ abort();
}
scopeid = strchr(address, '%');
if(scopeid)
*scopeid = '\0'; /* Descope. */
- *addrstr = xstrdup(address);
- *portstr = xstrdup(port);
+ if(addrstr)
+ *addrstr = xstrdup(address);
+ if(portstr)
+ *portstr = xstrdup(port);
}
char *sockaddr2hostname(const sockaddr_t *sa) {
default:
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
a->sa.sa_family);
- raise(SIGFPE);
- exit(0);
+ abort();
}
}
default:
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
a->sa.sa_family);
- raise(SIGFPE);
- exit(0);
+ abort();
}
}