diff options
| author | dsl <dsl@NetBSD.org> | 2003-07-26 16:06:44 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2003-07-26 16:06:44 +0000 |
| commit | f2eecf77ab39a2fb92f14d7b4c3d73503f766c36 (patch) | |
| tree | 3f0a7f25f3f009c514dfdb307c22724f43c50e2a /gnu/dist/cvs/src/commit.c | |
| parent | 8c66a01dc4f99eee9a6b4d158389f572194c0b38 (diff) | |
Define and use xasprintf() so that memory allocate errors are reported.
Diffstat (limited to 'gnu/dist/cvs/src/commit.c')
| -rw-r--r-- | gnu/dist/cvs/src/commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/dist/cvs/src/commit.c b/gnu/dist/cvs/src/commit.c index 55b06c3a34f..e7cdb964556 100644 --- a/gnu/dist/cvs/src/commit.c +++ b/gnu/dist/cvs/src/commit.c @@ -1797,7 +1797,7 @@ finaladd (finfo, rev, tag, options) if (ret == 0) { char *tmp; - (void) asprintf (&tmp, "%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG); + (void) xasprintf (&tmp, "%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG); if (unlink_file (tmp) < 0 && !existence_error (errno)) error (0, errno, "cannot remove %s", tmp); @@ -2004,7 +2004,7 @@ checkaddfile (file, repository, tag, options, rcsnode) desc = NULL; descalloc = 0; desclen = 0; - (void) asprintf (&fname, "%s/%s%s", CVSADM, file, CVSEXT_LOG); + (void) xasprintf (&fname, "%s/%s%s", CVSADM, file, CVSEXT_LOG); /* If the file does not exist, no big deal. In particular, the server does not (yet at least) create CVSEXT_LOG files. */ if (isfile (fname)) @@ -2066,7 +2066,7 @@ checkaddfile (file, repository, tag, options, rcsnode) FILE *fp; /* move the new file out of the way. */ - (void) asprintf (&fname, "%s/%s%s", CVSADM, CVSPREFIX, file); + (void) xasprintf (&fname, "%s/%s%s", CVSADM, CVSPREFIX, file); rename_file (file, fname); /* Create empty FILE. Can't use copy_file with a DEVNULL |
