summaryrefslogtreecommitdiffstats
path: root/usr.bin/chpass
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>1999-04-25 22:37:58 +0000
committerimp <imp@FreeBSD.org>1999-04-25 22:37:58 +0000
commit22f901a57c1958698d9cecf2b40a9fc0fd04f786 (patch)
tree4db883c020b4df70cb765924c2f0a2d0680f4620 /usr.bin/chpass
parentd12a7ef464b342d4fca0ef83535cf75b401d3f38 (diff)
downloadFreeBSD-src-22f901a57c1958698d9cecf2b40a9fc0fd04f786.zip
FreeBSD-src-22f901a57c1958698d9cecf2b40a9fc0fd04f786.tar.gz
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 'usr.bin/chpass')
-rw-r--r--usr.bin/chpass/edit.c4
-rw-r--r--usr.bin/chpass/pw_copy.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c
index 83cd2c8..cf4ae4d 100644
--- a/usr.bin/chpass/edit.c
+++ b/usr.bin/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/usr.bin/chpass/pw_copy.c b/usr.bin/chpass/pw_copy.c
index d60f751..f584ba3 100644
--- a/usr.bin/chpass/pw_copy.c
+++ b/usr.bin/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);
OpenPOWER on IntegriCloud