run_wgetrc (const char *file)
{
FILE *fp;
- char *line;
+ char *line = NULL;
+ size_t bufsize = 0;
int ln;
int errcnt = 0;
return true; /* not a fatal error */
}
ln = 1;
- while ((line = read_whole_line (fp)) != NULL)
+ while (getline (&line, &bufsize, fp) > 0)
{
char *com = NULL, *val = NULL;
int comind;
}
xfree_null (com);
xfree_null (val);
- xfree (line);
++ln;
}
+ xfree (line);
fclose (fp);
return errcnt == 0;