diff options
| author | cgd <cgd@NetBSD.org> | 1994-12-24 17:26:46 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1994-12-24 17:26:46 +0000 |
| commit | ccc2dcd4409baf085eb9f13e6b53a7a04d1d3d35 (patch) | |
| tree | c9d7d667a61cea62226fd401bf88629909aa7226 /usr.bin/nm/nm.c | |
| parent | 43f1b4becacaa990181f6447827fd51fcd759ced (diff) | |
be more careful with casts, and clean up a fprintf() call.
Diffstat (limited to 'usr.bin/nm/nm.c')
| -rw-r--r-- | usr.bin/nm/nm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/nm/nm.c b/usr.bin/nm/nm.c index eabd6044daa..16d31e6b52e 100644 --- a/usr.bin/nm/nm.c +++ b/usr.bin/nm/nm.c @@ -42,7 +42,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)nm.c 5.8 (Berkeley) 5/2/91";*/ -static char rcsid[] = "$Id: nm.c,v 1.4 1994/10/19 20:39:31 pk Exp $"; +static char rcsid[] = "$Id: nm.c,v 1.5 1994/12/24 17:26:46 cgd Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -241,13 +241,14 @@ show_archive(fname, fp) int len = atoi(&ar_head.ar_name[3]); if (len > namelen) { - p -= (int)name; + p -= (long)name; name = (char *)erealloc(name, baselen+len); namelen = len; - p += (int)name; + p += (long)name; } if (fread(p, len, 1, fp) != 1) { - (void)fprintf(stderr, "nm: %s: premature EOF.\n", name); + (void)fprintf(stderr, + "nm: %s: premature EOF.\n", name); (void)free(name); return 1; } |
