Severe bug in Menunix
Chris Lewis
nishri at utcs.UUCP
Thu Jan 31 09:29:09 AEST 1985
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
More information about the Comp.sources.bugs
mailing list