Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Dec 2023 04:18:34 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9f1c1cfe69d8 - stable/14 - strfmon.3: Cleanup example code
Message-ID:  <202312160418.3BG4IYmO058994@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=9f1c1cfe69d80b5f17008d6963ac409ecbad817b

commit 9f1c1cfe69d80b5f17008d6963ac409ecbad817b
Author:     Jose Luis Duran <jlduran@gmail.com>
AuthorDate: 2023-12-01 06:50:24 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-12-16 04:17:51 +0000

    strfmon.3: Cleanup example code
    
    (cherry picked from commit 2a163c3649e59dd616e057994ec02092362f0ae7)
---
 lib/libc/stdlib/strfmon.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/libc/stdlib/strfmon.3 b/lib/libc/stdlib/strfmon.3
index 7cd283573239..20cc560d401d 100644
--- a/lib/libc/stdlib/strfmon.3
+++ b/lib/libc/stdlib/strfmon.3
@@ -22,7 +22,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 25, 2023
+.Dd December 6, 2023
 .Dt STRFMON 3
 .Os
 .Sh NAME
@@ -154,10 +154,10 @@ to the string
 .Bd -literal -offset indent
 #include <stdio.h>
 #include <monetary.h>
-#include <xlocale.h>
+#include <locale.h>
 
 int
-main()
+main(void)
 {
 	char string[100];
 	double money = 1234567.89;
@@ -169,6 +169,8 @@ main()
 
 	strfmon(string, sizeof(string) - 1, "%n", money);
 	printf("%s\\n", string);
+
+	return (0);
 }
 .Ed
 .Sh ERRORS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312160418.3BG4IYmO058994>