1
0

patch-fdisk_sfdisk_c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --- util-linux-ng-2.15.orig/fdisk/sfdisk.c 2009-05-05 21:16:46.000000000 +0200
  2. +++ util-linux-ng-2.15/fdisk/sfdisk.c 2009-06-22 22:41:09.000000000 +0200
  3. @@ -1725,12 +1725,12 @@ read_stdin(char **fields, char *line, in
  4. eof = 1;
  5. return RD_EOF;
  6. }
  7. - if (!(lp = index(lp, '\n')))
  8. + if (!(lp = strchr(lp, '\n')))
  9. fatal(_("long or incomplete input line - quitting\n"));
  10. *lp = 0;
  11. /* remove comments, if any */
  12. - if ((lp = index(line+2, '#')) != 0)
  13. + if ((lp = strchr(line+2, '#')) != 0)
  14. *lp = 0;
  15. /* recognize a few commands - to be expanded */
  16. @@ -1740,7 +1740,7 @@ read_stdin(char **fields, char *line, in
  17. }
  18. /* dump style? - then bad input is fatal */
  19. - if ((ip = index(line+2, ':')) != 0) {
  20. + if ((ip = strchr(line+2, ':')) != 0) {
  21. struct dumpfld *d;
  22. nxtfld:
  23. @@ -2503,7 +2503,7 @@ main(int argc, char **argv) {
  24. if (argc < 1)
  25. fatal(_("no command?\n"));
  26. - if ((progn = rindex(argv[0], '/')) == NULL)
  27. + if ((progn = strrchr(argv[0], '/')) == NULL)
  28. progn = argv[0];
  29. else
  30. progn++;