summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefan <stefan@openbsd.org>2007-10-08 12:02:12 +0000
committerstefan <stefan@openbsd.org>2007-10-08 12:02:12 +0000
commit3336d93bf2b3df2e31886d6847669ba9d29a1371 (patch)
treeaa6ce6d5164f2d158b406fc1ae2de1e9c2f635f5
parentadd a RETURN VALUES section. (diff)
downloadwireguard-openbsd-3336d93bf2b3df2e31886d6847669ba9d29a1371.tar.xz
wireguard-openbsd-3336d93bf2b3df2e31886d6847669ba9d29a1371.zip
Remove two unneeded macro definitions, replace strdup() with copy() which
does error checking. otto@, ragge@ ok
-rw-r--r--usr.bin/pcc/cc/cc.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/pcc/cc/cc.c b/usr.bin/pcc/cc/cc.c
index a7f26377ed8..9d273a55432 100644
--- a/usr.bin/pcc/cc/cc.c
+++ b/usr.bin/pcc/cc/cc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cc.c,v 1.2 2007/10/07 18:39:03 otto Exp $ */
+/* $OpenBSD: cc.c,v 1.3 2007/10/08 12:02:12 stefan Exp $ */
/*
* Copyright(C) Caldera International Inc. 2001-2002. All rights reserved.
*
@@ -74,8 +74,6 @@
*/
#define STDINC "/usr/include"
-#define SBSIZE 10000
-#define MAXINC 100
#define MAXFIL 10000
#define MAXLIB 10000
#define MAXAV 10000
@@ -761,9 +759,9 @@ char *f;
}
char *
-gettmp()
+gettmp(void)
{
- char *sfn = strdup("/tmp/ctm.XXXXXX");
+ char *sfn = copy("/tmp/ctm.XXXXXX");
int fd = -1;
if ((fd = mkstemp(sfn)) == -1) {