Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2001 03:00:05 -0800 (PST)
From:      "Nick Hilliard" <nick@netability.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/24798: pac dumps core if "af" is not specified in /etc/printcap
Message-ID:  <200102211100.f1LB05f25858@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/24798; it has been noted by GNATS.

From: "Nick Hilliard" <nick@netability.ie>
To: Peter Pentchev <roam@orbitel.bg>
Cc: nick@netability.ie, FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/24798: pac dumps core if "af" is not specified in /etc/printcap
Date: Wed, 21 Feb 2001 10:57:37 +0000

 > This printf + exit could be rewritten in a more BSD-ish style as:
 > 
 > 	err(3, "accounting not enabled for %s", s);
 
 yeah, probably.  Actually, I was just imitating the printf() & exit() a few
 lines before for consistency's sake.  For convenience, here's the same thing
 using err:
 
 --- pac.c.orig	Wed Feb 21 10:53:33 2001
 +++ pac.c	Wed Feb 21 10:55:50 2001
 @@ -450,7 +450,8 @@
  	case PCAPERR_TCLOOP:
  		fatal(pp, "%s", pcaperr(stat));
  	}
 -	acctfile = pp->acct_file;
 +	if ((acctfile = pp->acct_file) == NULL)
 +		err(3, "accounting not enabled for %s", s);
  	if (!pflag && pp->price100)
  		price = pp->price100/10000.0;
  	sumfile = (char *) calloc(sizeof(char), strlen(acctfile)+5);
 
 Anyway, now that there's a definite schedule for 4.3-release, can someone
 organise to get one or other of these patchlets committed before the code
 freeze?
 
 Nick

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102211100.f1LB05f25858>