The branch main has been updated by lwhsu:

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

commit 7d5fd25ab8f5cc704484e4ec5cd851bedf8fbd1d
Author:     Yan-Hao Wang <yanhaow...@freebsd.org>
AuthorDate: 2024-10-12 15:08:45 +0000
Commit:     Li-Wen Hsu <lw...@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);
 }

Reply via email to