dhcpcd-discuss

minor duid_get bug

rfc

Fri Jun 12 04:43:16 2015

in duid.c:duid_get() i see:

	x = fprintf(fp, "%s\n", hwaddr_ntoa(d, len, line, sizeof(line)));
	fclose(fp);
	/* Failed to write the duid? scrub it, we cannot use it */
	if (x < 1) {
		...
	}

a write error here is more likely to occur in the fclose than the
fprintf.  a simple fix might be:

	if (fclose(fp) == EOF)
		x = 0;

bob.

Follow-Ups:
Re: minor duid_get bugRoy Marples
Archive administrator: postmaster@marples.name