summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfprintf.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2016-06-06 17:22:59 +0000
committermillert <millert@openbsd.org>2016-06-06 17:22:59 +0000
commit6aecfbc88758946162288af18e71fe549477ef7a (patch)
tree9a4cbef63047259225ff11f7666f65de11f62999 /lib/libc/stdio/vfprintf.c
parentProvide a bus_dma tag as part of the pvbus attach arguments (diff)
downloadwireguard-openbsd-6aecfbc88758946162288af18e71fe549477ef7a.tar.xz
wireguard-openbsd-6aecfbc88758946162288af18e71fe549477ef7a.zip
Return EOVERFLOW, not ENOMEM for overflow conditions to match POSIX.
Diffstat (limited to 'lib/libc/stdio/vfprintf.c')
-rw-r--r--lib/libc/stdio/vfprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 70fd5e24b2b..252b7b84466 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfprintf.c,v 1.72 2016/01/19 18:22:53 mmcc Exp $ */
+/* $OpenBSD: vfprintf.c,v 1.73 2016/06/06 17:22:59 millert Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -1076,7 +1076,7 @@ error:
goto finish;
overflow:
- errno = ENOMEM;
+ errno = EOVERFLOW;
ret = -1;
finish:
@@ -1474,7 +1474,7 @@ done:
goto finish;
overflow:
- errno = ENOMEM;
+ errno = EOVERFLOW;
ret = -1;
finish: