diff options
author | Mark Murray <markm@FreeBSD.org> | 2002-03-24 10:21:22 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2002-03-24 10:21:22 +0000 |
commit | 04d1b23be991cae809ac39645d9ac7341ec74885 (patch) | |
tree | 570b4de402d47f08b3d2e31389b82165ebf55645 /chpass/edit.c | |
parent | 12d207dc921798d10a6d3a1371214adbd74a8768 (diff) | |
download | pw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.tar.gz pw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.tar.zst pw-darwin-04d1b23be991cae809ac39645d9ac7341ec74885.zip |
Fix warns, ANSIfy, use __FBSDID(), sort headers.
Diffstat (limited to 'chpass/edit.c')
-rw-r--r-- | chpass/edit.c | 19 |
1 files changed, 8 insertions, 11 deletions
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 <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/param.h> #include <sys/stat.h> @@ -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); |