summaryrefslogtreecommitdiffstats
path: root/chpass
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>1999-04-25 22:37:58 +0000
committerWarner Losh <imp@FreeBSD.org>1999-04-25 22:37:58 +0000
commite7e9d20da36ec9757300784f37aed5181d178894 (patch)
treecb6fd8f0a28817af528cc02b423f961aa342e8b2 /chpass
parent30cef967236e71e58d04e008d53d82db5d4361d9 (diff)
downloadpw-darwin-e7e9d20da36ec9757300784f37aed5181d178894.tar.gz
pw-darwin-e7e9d20da36ec9757300784f37aed5181d178894.tar.zst
pw-darwin-e7e9d20da36ec9757300784f37aed5181d178894.zip
More egcs warning fixes:
o main returns int not void o use return 0 at end of main when needed o use braces to avoid potentially ambiguous else o don't default to type int o #ifdef 0 -> #if 0 Reviewed by: obrien and chuckr
Diffstat (limited to 'chpass')
-rw-r--r--chpass/edit.c4
-rw-r--r--chpass/pw_copy.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/chpass/edit.c b/chpass/edit.c
index 83cd2c8..cf4ae4d 100644
--- a/chpass/edit.c
+++ b/chpass/edit.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: edit.c,v 1.12 1998/12/06 22:58:14 archie Exp $
+ * $Id: edit.c,v 1.13 1999/02/23 02:41:26 ghelmer Exp $
*/
#ifndef lint
@@ -120,7 +120,7 @@ display(fd, pw)
*pw->pw_shell ? pw->pw_shell : _PATH_BSHELL);
}
/* Only admin can change "restricted" shells. */
-#ifdef 0
+#if 0
else if (ok_shell(pw->pw_shell))
/*
* Make shell a restricted field. Ugly with a
diff --git a/chpass/pw_copy.c b/chpass/pw_copy.c
index d60f751..f584ba3 100644
--- a/chpass/pw_copy.c
+++ b/chpass/pw_copy.c
@@ -109,7 +109,7 @@ pw_copy(ffd, tfd, pw)
if (ferror(to))
goto err;
}
- if (!done)
+ if (!done) {
#ifdef YP
/* Ultra paranoid: shouldn't happen. */
if (getuid()) {
@@ -126,6 +126,7 @@ pw_copy(ffd, tfd, pw)
pw->pw_fields & _PWF_CHANGE ? chgstr : "",
pw->pw_fields & _PWF_EXPIRE ? expstr : "",
pw->pw_gecos, pw->pw_dir, pw->pw_shell);
+ }
if (ferror(to))
err: pw_error(NULL, 1, 1);