Subject: Re: bin/2974: mount's child's argv[0] lies, crunch loses
To: None <netbsd-bugs@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: netbsd-bugs
Date: 11/29/1996 15:43:52
In article <199611290548.XAA02299@linkdead.paranoia.com> vax@linkdead.paranoia.com writes:

-               if (fscanf(mountdfp, "%ld", &pid) == 1 &&
+               if (fscanf(mountdfp, "%ld", (long *) &pid) == 1 &&

This is definitely wrong. It will blow up on the alpha where long is
64 bits and pid_t is 32. A better fix is probably something like:

		int pidt;
		if (fscanf(mountdfp, "%d", &pidt) == 1) {
			pid = (pid_t) pidt;
		}

christos