mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 21:43:34 +00:00
Use err() instead of perror()/exit() and remember to #include <errno.h>
and <err.h>.
This commit is contained in:
parent
93d20d6e7f
commit
09cd72056a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17424
@ -35,16 +35,18 @@
|
||||
* Center for Telecommunications Research
|
||||
* Columbia University, New York City
|
||||
*
|
||||
* $Id: revnetgroup.c,v 1.1.1.1 1995/10/26 16:25:29 wpaul Exp $
|
||||
* $Id: revnetgroup.c,v 1.2 1996/05/12 17:17:45 wpaul Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <err.h>
|
||||
#include "hash.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id$";
|
||||
static const char rcsid[] = "$Id: revnetgroup.c,v 1.2 1996/05/12 17:17:45 wpaul Exp $";
|
||||
#endif
|
||||
|
||||
#define LINSIZ 1024
|
||||
@ -120,8 +122,7 @@ main(argc, argv)
|
||||
|
||||
if (strcmp(netgroup, "-")) {
|
||||
if ((fp = fopen(netgroup, "r")) == NULL) {
|
||||
perror(netgroup);
|
||||
exit(1);
|
||||
err(1,netgroup);
|
||||
}
|
||||
} else {
|
||||
fp = stdin;
|
||||
|
Loading…
Reference in New Issue
Block a user