Mail Archives: djgpp-workers/2011/09/16/21:32:17
Am Samstag, 17. September 2011 schrieb DJ Delorie:
>
> I don't think it matters what it returns, since it's called *after*
> all the processing is done.
>
> So, returning 1 is fine.
>
OK, the issue that confused me was that the function reurned a pointer instead
of an integer and then a 0 instead of a 1 as told in the documentation. If it does
not relly matter then I commit the original patch propossed by Ozkan Sezer.
Regards,
Juan M. Guerrero
Index: djgpp/src/libc/compat/mntent/mntent.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/mntent/mntent.c,v
retrieving revision 1.11
diff -U 5 -r1.11 mntent.c
--- djgpp/src/libc/compat/mntent/mntent.c 2 Aug 2009 05:37:01 -0000 1.11
+++ djgpp/src/libc/compat/mntent/mntent.c 17 Sep 2011 01:16:05 -0000
@@ -869,11 +869,11 @@
endmntent(FILE *filep)
{
if (filep != (FILE *)1)
{
errno = EBADF; /* fake errno for invalid handle */
- return NULL;
+ return 0;
}
drive_number = 0;
skip_drive_b = 0;
return 1;
}
- Raw text -