summaryrefslogtreecommitdiffstats
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index 41884781e03..be4b7f4ac61 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: patch.c,v 1.7 1996/09/24 02:58:52 millert Exp $ */
+/* $OpenBSD: patch.c,v 1.8 1996/09/24 04:19:28 millert Exp $ */
/* patch - a program to apply diffs to original files
*
@@ -9,7 +9,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: patch.c,v 1.7 1996/09/24 02:58:52 millert Exp $";
+static char rcsid[] = "$OpenBSD: patch.c,v 1.8 1996/09/24 04:19:28 millert Exp $";
#endif /* not lint */
#include "INTERN.h"
@@ -81,28 +81,28 @@ char **argv;
TMPOUTNAME = (char *) malloc (tmpname_len);
strcpy (TMPOUTNAME, tmpdir);
strcat (TMPOUTNAME, "/patchoXXXXXX");
- if ((i = Mkstemp(TMPOUTNAME)) < 0)
+ if ((i = mkstemp(TMPOUTNAME)) < 0)
pfatal2("can't create %s", TMPOUTNAME);
Close(i);
TMPINNAME = (char *) malloc (tmpname_len);
strcpy (TMPINNAME, tmpdir);
strcat (TMPINNAME, "/patchiXXXXXX");
- if ((i = Mkstemp(TMPINNAME)) < 0)
+ if ((i = mkstemp(TMPINNAME)) < 0)
pfatal2("can't create %s", TMPINNAME);
Close(i);
TMPREJNAME = (char *) malloc (tmpname_len);
strcpy (TMPREJNAME, tmpdir);
strcat (TMPREJNAME, "/patchrXXXXXX");
- if ((i = Mkstemp(TMPREJNAME)) < 0)
+ if ((i = mkstemp(TMPREJNAME)) < 0)
pfatal2("can't create %s", TMPREJNAME);
Close(i);
TMPPATNAME = (char *) malloc (tmpname_len);
strcpy (TMPPATNAME, tmpdir);
strcat (TMPPATNAME, "/patchpXXXXXX");
- if ((i = Mkstemp(TMPPATNAME)) < 0)
+ if ((i = mkstemp(TMPPATNAME)) < 0)
pfatal2("can't create %s", TMPPATNAME);
Close(i);
}
@@ -488,9 +488,9 @@ get_some_switches()
s = nextarg();
if (!isalpha(*s) && '_' != *s)
fatal1("argument to -D is not an identifier\n");
- Sprintf(if_defined, "#ifdef %s\n", s);
- Sprintf(not_defined, "#ifndef %s\n", s);
- Sprintf(end_defined, "#endif /* %s */\n", s);
+ Snprintf(if_defined, sizeof if_defined, "#ifdef %s\n", s);
+ Snprintf(not_defined, sizeof not_defined, "#ifndef %s\n", s);
+ Snprintf(end_defined, sizeof end_defined, "#endif /* %s */\n", s);
break;
case 'e':
diff_type = ED_DIFF;