Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Oct 2024 18:30:19 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7d5fd25ab8f5 - main - lastlogin(8): Complete libxo transition
Message-ID:  <202410121830.49CIUJh9092252@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/src/commit/?id=7d5fd25ab8f5cc704484e4ec5cd851bedf8fbd1d

commit 7d5fd25ab8f5cc704484e4ec5cd851bedf8fbd1d
Author:     Yan-Hao Wang <yanhaowang@FreeBSD.org>
AuthorDate: 2024-10-12 15:08:45 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2024-10-12 18:21:47 +0000

    lastlogin(8): Complete libxo transition
    
    Reviewed by:    dees
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D41414
---
 usr.sbin/lastlogin/lastlogin.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/lastlogin/lastlogin.c b/usr.sbin/lastlogin/lastlogin.c
index 3a71693f7576..ddd0f733b940 100644
--- a/usr.sbin/lastlogin/lastlogin.c
+++ b/usr.sbin/lastlogin/lastlogin.c
@@ -38,7 +38,6 @@
 __RCSID("$NetBSD: lastlogin.c,v 1.4 1998/02/03 04:45:35 perry Exp $");
 #endif
 
-#include <err.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -147,7 +146,8 @@ main(int argc, char *argv[])
 
 	xo_close_list("lastlogin");
 	xo_close_container("lastlogin-information");
-	xo_finish();
+	if (xo_finish() < 0)
+		xo_err(1, "stdout");
 
 	exit(0);
 }
@@ -170,6 +170,5 @@ static void
 usage(void)
 {
 	xo_error("usage: lastlogin [-f file] [-rt] [user ...]\n");
-	xo_finish();
 	exit(1);
 }


home | help

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