From 6aecfbc88758946162288af18e71fe549477ef7a Mon Sep 17 00:00:00 2001 From: millert Date: Mon, 6 Jun 2016 17:22:59 +0000 Subject: Return EOVERFLOW, not ENOMEM for overflow conditions to match POSIX. --- lib/libc/stdio/vfprintf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libc/stdio/vfprintf.c') 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: -- cgit v1.2.3-59-g8ed1b