- "Destination Gateway Genmask"
- " Flags %s Iface\n",
- netstatfmt ? " MSS Window irtt" : "Metric Ref Use");
-
- if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */
- goto ERROR; /* Empty or missing line, or read error. */
+ "Destination Gateway Genmask Flags %s Iface\n",
+ netstatfmt ? " MSS Window irtt" : "Metric Ref Use");
+
+ /* Skip the first line. */
+ r = fscanf(fp, "%*[^\n]\n");
+ if (r < 0) {
+ /* Empty line, read error, or EOF. Yes, if routing table
+ * is completely empty, /proc/net/route has no header.
+ */
+ goto ERROR;