From 8e7c13433121e3ca9bf5b204dfa2889c2b9f7aaf Mon Sep 17 00:00:00 2001 From: mlaier Date: Wed, 15 Mar 2006 00:30:19 +0000 Subject: Use strtonum now that we have it in libc as well. --- contrib/pf/pflogd/pflogd.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'contrib/pf/pflogd') diff --git a/contrib/pf/pflogd/pflogd.c b/contrib/pf/pflogd/pflogd.c index 6ef6a77..274f8ff 100644 --- a/contrib/pf/pflogd/pflogd.c +++ b/contrib/pf/pflogd/pflogd.c @@ -569,35 +569,20 @@ main(int argc, char **argv) Debug = 1; break; case 'd': -#ifdef __OpenBSD__ delay = strtonum(optarg, 5, 60*60, &errstr); if (errstr) -#else - delay = strtol(optarg, &errstr, 10); - if ((delay < 5) || (delay > 60*60) || - ((errstr != NULL) && (*errstr != '\0'))) -#endif usage(); break; case 'f': filename = optarg; break; case 's': -#ifdef __OpenBSD__ snaplen = strtonum(optarg, 0, PFLOGD_MAXSNAPLEN, &errstr); if (snaplen <= 0) snaplen = DEF_SNAPLEN; if (errstr) snaplen = PFLOGD_MAXSNAPLEN; -#else - snaplen = strtol(optarg, &errstr, 10); - if (snaplen <= 0) - snaplen = DEF_SNAPLEN; - if ((snaplen > PFLOGD_MAXSNAPLEN) || - ((errstr != NULL) && (*errstr != '\0'))) - snaplen = PFLOGD_MAXSNAPLEN; -#endif break; case 'x': Xflag++; -- cgit v1.1