summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/diff_internals.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-04-24 19:13:57 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-04-24 19:13:57 +0000
commit81d526270463844aec19caa761aa604da4337704 (patch)
tree7d4a6cb37ff29459d9b81d0c653ae18f70c1c5d3 /usr.bin/cvs/diff_internals.c
parent0c27ead80b04184f7b702e36712010c78cde1fda (diff)
Use a fixed string in case of vasprintf() error instead of relying on
strerror(). Although our vasprintf() sets errno, we cannot rely on it on other systems. ok ray (who spotted this issue), xsa
Diffstat (limited to 'usr.bin/cvs/diff_internals.c')
-rw-r--r--usr.bin/cvs/diff_internals.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/diff_internals.c b/usr.bin/cvs/diff_internals.c
index 2c022d7d9f5..ff0a264d3df 100644
--- a/usr.bin/cvs/diff_internals.c
+++ b/usr.bin/cvs/diff_internals.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff_internals.c,v 1.20 2008/03/08 11:53:36 joris Exp $ */
+/* $OpenBSD: diff_internals.c,v 1.21 2008/04/24 19:13:56 tobias Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -1454,7 +1454,7 @@ diff_output(const char *fmt, ...)
i = vasprintf(&str, fmt, vap);
va_end(vap);
if (i == -1)
- fatal("diff_output: %s", strerror(errno));
+ fatal("diff_output: could not allocate memory");
if (diffbuf != NULL)
cvs_buf_append(diffbuf, str, strlen(str));
else