summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen/rpc_cout.c
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-06 06:47:41 +0000
committercharnier <charnier@FreeBSD.org>1997-08-06 06:47:41 +0000
commit4dfc83bbfada9199ece96a93eddf345a747b6271 (patch)
treee4b3fd234e4535104deb383b08ed503b38652568 /usr.bin/rpcgen/rpc_cout.c
parent5f9cb6429dd14c9977c8dfee9f1243a5e02920e4 (diff)
downloadFreeBSD-src-4dfc83bbfada9199ece96a93eddf345a747b6271.zip
FreeBSD-src-4dfc83bbfada9199ece96a93eddf345a747b6271.tar.gz
Use err(3), cosmetic in usage(), remove `cmdname'.
Diffstat (limited to 'usr.bin/rpcgen/rpc_cout.c')
-rw-r--r--usr.bin/rpcgen/rpc_cout.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c
index 7445fd7..f8dd6b3 100644
--- a/usr.bin/rpcgen/rpc_cout.c
+++ b/usr.bin/rpcgen/rpc_cout.c
@@ -30,16 +30,21 @@
#ident "@(#)rpc_cout.c 1.14 93/07/05 SMI"
#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
#endif
+static const char rcsid[] =
+ "$Id$";
+#endif
/*
* rpc_cout.c, XDR routine outputter for the RPC protocol compiler
* Copyright (C) 1987, Sun Microsystems, Inc.
*/
+#include <err.h>
+#include <ctype.h>
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
#include "rpc_parse.h"
#include "rpc_util.h"
@@ -453,8 +458,7 @@ int flag;
strlen(sizestr)
+strlen(ptemp)+1);
if (sizestr == NULL){
- f_print(stderr,
- "Fatal error : no memory\n");
+ warnx("fatal error: no memory");
crash();
};
sizestr = strcat(sizestr, ptemp);
@@ -744,10 +748,7 @@ char *str;
ptr = (char *)malloc(strlen(str)+1);
if (ptr == (char *) NULL)
- {
- f_print(stderr, "malloc failed\n");
- exit(1);
- };
+ errx(1, "malloc failed");
hptr = ptr;
while (*str != '\0')
OpenPOWER on IntegriCloud