patch-src_mntent_c 712 B

123456789101112131415161718192021
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- watchdog-5.2.4.orig.orig/src/mntent.c 2003-01-28 07:47:38.000000000 +0100
  3. +++ watchdog-5.2.4.orig/src/mntent.c 2008-10-16 13:00:20.000000000 +0200
  4. @@ -6,7 +6,7 @@
  5. #endif
  6. #include <stdio.h>
  7. -#include <string.h> /* for index */
  8. +#include <string.h> /* for strchr */
  9. #include <ctype.h> /* for isdigit */
  10. #include "wd_mntent.h"
  11. #include "sundries.h" /* for xmalloc */
  12. @@ -155,7 +155,7 @@ my_getmntent (mntFILE *mfp) {
  13. if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL)
  14. return NULL;
  15. - s = index (buf, '\n');
  16. + s = strchr (buf, '\n');
  17. if (s == NULL) {
  18. /* extremely long line - assume file was corrupted */
  19. mfp->mntent_errs = 1;