From 04d1b23be991cae809ac39645d9ac7341ec74885 Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Sun, 24 Mar 2002 10:21:22 +0000 Subject: Fix warns, ANSIfy, use __FBSDID(), sort headers. --- chpass/edit.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'chpass/edit.c') diff --git a/chpass/edit.c b/chpass/edit.c index 849d5d9..e671d58 100644 --- a/chpass/edit.c +++ b/chpass/edit.c @@ -29,14 +29,15 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #ifndef lint static const char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; #endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); + #include #include @@ -62,8 +63,7 @@ static const char sccsid[] = "@(#)edit.c 8.3 (Berkeley) 4/2/94"; extern char *tempname; void -edit(pw) - struct passwd *pw; +edit(struct passwd *pw) { struct stat begin, end; char *begin_sum, *end_sum; @@ -95,12 +95,10 @@ edit(pw) * set conditional flag if the user gets to edit the shell. */ void -display(fd, pw) - int fd; - struct passwd *pw; +display(int fd, struct passwd *pw) { FILE *fp; - char *bp, *p, *ttoa(); + char *bp, *p; if (!(fp = fdopen(fd, "w"))) pw_error(tempname, 1, 1); @@ -181,8 +179,7 @@ display(fd, pw) } int -verify(pw) - struct passwd *pw; +verify(struct passwd *pw) { ENTRY *ep; char *p; @@ -260,7 +257,7 @@ bad: (void)fclose(fp); pw->pw_name, pw->pw_passwd, (unsigned long)pw->pw_uid, (unsigned long)pw->pw_gid, pw->pw_class, (long)pw->pw_change, (long)pw->pw_expire, pw->pw_gecos, pw->pw_dir, - pw->pw_shell) >= sizeof(buf)) { + pw->pw_shell) >= (int)sizeof(buf)) { warnx("entries too long"); free(p); return (0); -- cgit v1.2.3-56-ge451