Browse Source

Use strchr() instead of the deprecated index().

Patch from Bernhard Fischer.


git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@4862 7894878c-1315-0410-8ee3-d5d059ff63e0
tags/v3.0.0
Jean Delvare 18 years ago
parent
commit
194964d667
  1. 2
      tools/i2cbusses.c

2
tools/i2cbusses.c

@ -185,7 +185,7 @@ found:
fprintf(stderr, "%s: read error\n", n); fprintf(stderr, "%s: read error\n", n);
continue; continue;
} }
if((border = index(x, '\n')) != NULL)
if ((border = strchr(x, '\n')) != NULL)
*border = 0; *border = 0;
if(count++ == 0 && !procfmt) if(count++ == 0 && !procfmt)
fprintf(stderr," Installed I2C busses:\n"); fprintf(stderr," Installed I2C busses:\n");

Loading…
Cancel
Save