From 5e92382d78a53c36e8dca4315927abbc11a2c0b6 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Mon, 1 Feb 2016 19:57:29 +0000 Subject: Hmm, SHELLSPRINT may be pointless, but keep it for consistency with other dbs. --- usr.bin/getent/getent.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/getent/getent.c b/usr.bin/getent/getent.c index c6f357a0c03..bf4fa22a9b9 100644 --- a/usr.bin/getent/getent.c +++ b/usr.bin/getent/getent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getent.c,v 1.13 2016/02/01 19:52:40 jca Exp $ */ +/* $OpenBSD: getent.c,v 1.14 2016/02/01 19:57:28 jca Exp $ */ /* $NetBSD: getent.c,v 1.7 2005/08/24 14:31:02 ginsbach Exp $ */ /*- @@ -439,6 +439,8 @@ services(int argc, char *argv[]) return rv; } +#define SHELLSPRINT printf("%s\n", sh) + static int shells(int argc, char *argv[]) { @@ -448,13 +450,13 @@ shells(int argc, char *argv[]) setusershell(); if (argc == 2) { while ((sh = getusershell()) != NULL) - printf("%s\n", sh); + SHELLSPRINT; } else { for (i = 2; i < argc; i++) { setusershell(); while ((sh = getusershell()) != NULL) { if (strcmp(sh, argv[i]) == 0) { - printf("%s\n", sh); + SHELLSPRINT; break; } } -- cgit v1.2.3