mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use a more standard error message. Add FBSDID.
Reviewed by: ru
This commit is contained in:
parent
822ded67fe
commit
29e3edcc64
1 changed files with 5 additions and 4 deletions
|
|
@ -8,10 +8,11 @@
|
|||
* You may copy, modify and distribute this software (natd.c) freely.
|
||||
*
|
||||
* Ari Suutari <suutari@iki.fi>
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#define SYSLOG_NAMES
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
@ -1601,7 +1602,7 @@ u_short StrToPort (const char* str, const char* proto)
|
|||
|
||||
sp = getservbyname (str, proto);
|
||||
if (!sp)
|
||||
errx (1, "unknown service %s/%s", str, proto);
|
||||
errx (1, "%s/%s: unknown service", str, proto);
|
||||
|
||||
return sp->s_port;
|
||||
}
|
||||
|
|
@ -1633,7 +1634,7 @@ int StrToPortRange (const char* str, const char* proto, port_range *portRange)
|
|||
}
|
||||
|
||||
/* Error in port range field. */
|
||||
errx (1, "unknown service %s/%s", str, proto);
|
||||
errx (1, "%s/%s: unknown service", str, proto);
|
||||
}
|
||||
|
||||
/* Port range, get the values and sanity check. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue