Yet another fix for gcc 4.2

This commit is contained in:
Baptiste Daroussin 2015-09-05 22:33:40 +00:00
parent cb291e8aa1
commit 1bc54324e9

View File

@ -83,13 +83,13 @@ do_locate(int fd, unsigned int idx, bool onoff)
static bool
disk_match(const char *devnames, const char *disk, size_t len)
{
const char *devname;
const char *dname;
devname = devnames;
while ((devname = strstr(devname, disk)) != NULL) {
if (devname[len] == '\0' || devname[len] == ',')
dname = devnames;
while ((dname = strstr(dname, disk)) != NULL) {
if (dname[len] == '\0' || dname[len] == ',')
return (true);
devname++;
dname++;
}
return (false);
}