fclose(fp);
return avail;
}
- while((fgets(tmp, 256, fp) > 0) && (avail == -1))
+ while((fgets(tmp, 256, fp) != NULL) && (avail == -1))
{
char *t;
char tmp2[32];
fp = fopen(tmp2, "r");
if(fp)
{
- while(fgets(tmp2, 64, fp) > 0)
+ while(fgets(tmp2, 64, fp) != NULL)
{
serial = strstr(tmp2, "Serial Number:");
if(serial)
return;
}
mounted_count = 0;
- while(fgets(tmp, 256, fp) > 0)
+ while(fgets(tmp, 256, fp) != NULL)
{
char *t, *t2;
t = strstr(tmp, " ");