diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-02-01 19:57:29 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-02-01 19:57:29 +0000 |
commit | 5e92382d78a53c36e8dca4315927abbc11a2c0b6 (patch) | |
tree | fbc649ca953c55f293231abe47b1501cb1788029 | |
parent | a3fcd162868289dae82de8fb69abae8a62606403 (diff) |
Hmm, SHELLSPRINT may be pointless, but keep it for consistency with other dbs.
-rw-r--r-- | usr.bin/getent/getent.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } } |