Page MenuHomeFreeBSD

Alternate solution to D10462
ClosedPublic

Authored by dim on Apr 24 2017, 7:27 PM.
Tags
None
Referenced Files
F162721126: D10484.diff
Thu, Jul 16, 3:47 AM
F162690109: D10484.id.diff
Wed, Jul 15, 7:36 PM
Unknown Object (File)
Thu, Jul 9, 4:18 PM
Unknown Object (File)
Jun 13 2026, 8:33 AM
Unknown Object (File)
May 7 2026, 7:44 AM
Unknown Object (File)
May 6 2026, 3:10 AM
Unknown Object (File)
May 1 2026, 4:06 PM
Unknown Object (File)
Apr 30 2026, 7:02 PM
Subscribers

Details

Summary

In D10462, I swapped the test around to get rid of gcc 4.2's warning
about usr.bin/diff/diffreg.c. However, @brooks noted similarly to
what I said there, that re-using i is pretty confusing.

So here's another approach: store the return value from fetch() in a
dedicated variable f, and initialize it to zero before the if.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable