summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-05-17 14:14:47 +0000
committerpeter <peter@FreeBSD.org>1997-05-17 14:14:47 +0000
commita3f9754a77738ed87f8ad9ba95fecfc3d59249a3 (patch)
tree8708a78a60d3f3ff47335aeee688ecfaa710b083 /contrib
parent9d520c8a553dc94877f83f7a0ea1930ec04fb6fe (diff)
downloadFreeBSD-src-a3f9754a77738ed87f8ad9ba95fecfc3d59249a3.zip
FreeBSD-src-a3f9754a77738ed87f8ad9ba95fecfc3d59249a3.tar.gz
use xstrdup rather than strdup in case of malloc failure.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cvs/src/rcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c
index 899167a..ff4b47c 100644
--- a/contrib/cvs/src/rcs.c
+++ b/contrib/cvs/src/rcs.c
@@ -4300,11 +4300,11 @@ RCS_setlocalid (arg)
{
char *copy, *next, *key;
- copy = strdup(arg);
+ copy = xstrdup(arg);
next = copy;
key = strtok(next, "=");
- keywords[KEYWORD_LOCALID].string = strdup(key);
+ keywords[KEYWORD_LOCALID].string = xstrdup(key);
keywords[KEYWORD_LOCALID].len = strlen(key);
/* options? */
@@ -4330,7 +4330,7 @@ RCS_setincexc (arg)
int include = 0;
struct rcs_keyword *keyword;
- copy = strdup(arg);
+ copy = xstrdup(arg);
next = copy;
switch (*next++) {
case 'e':
OpenPOWER on IntegriCloud