From 05bac98d8ef1e3b8516c4401abd24c49da6105f3 Mon Sep 17 00:00:00 2001 From: millert Date: Tue, 13 Oct 2015 12:25:04 +0000 Subject: [PATCH] Sync printf family return value with ISO C which specifies that these functions return a negative value on failure. OK doug@ deraadt@ --- lib/libc/stdio/printf.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdio/printf.3 b/lib/libc/stdio/printf.3 index 6b724da8687..e94ccf44267 100644 --- a/lib/libc/stdio/printf.3 +++ b/lib/libc/stdio/printf.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: printf.3,v 1.73 2015/06/03 16:26:04 millert Exp $ +.\" $OpenBSD: printf.3,v 1.74 2015/10/13 12:25:04 millert Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" .\" @(#)printf.3 8.1 (Berkeley) 6/4/93 .\" -.Dd $Mdocdate: June 3 2015 $ +.Dd $Mdocdate: October 13 2015 $ .Dt PRINTF 3 .Os .Sh NAME @@ -642,7 +642,7 @@ a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result. .Sh RETURN VALUES For all these functions if an output or encoding error occurs, a value -of \-1 is returned. +less than 0 is returned. .Pp The .Fn printf , -- 2.20.1