[net.sources.bugs] Severe bug in Menunix

nishri@utcs.UUCP (02/04/85)

Bug in menunix, file utility.c, function "xopen" is missing a return value.
Function should look like:

FILE *
xopen (name, mode) char *name, *mode;
	{
	FILE	*ioptr = fopen (name, mode);
	if (ioptr == NULL)
		{
		fprintf (stderr, "Can't open %s\n", name);
		exit (1);
		}
	return(ioptr);	/* missing from distributed version */
	}

This fixes the core dump problem mentioned previously - the originator's
compiler just happened to leave "ioptr" in the return register - really
lucky... We're running on a Pyramid which does not do this.  Sure wish people
would run lint on what they post!

UUCP: utcs!mnetor!clewis