Page MenuHomeFreeBSD

diff: Use change start when searching for function names
ClosedPublic

Authored by thj on Feb 21 2022, 11:19 AM.
Tags
None
Referenced Files
F174470684: D34328.id103024.diff
Sat, Oct 3, 12:30 PM
Unknown Object (File)
Fri, Oct 2, 4:31 PM
Unknown Object (File)
Wed, Sep 30, 8:13 PM
Unknown Object (File)
Wed, Sep 30, 1:54 PM
Unknown Object (File)
Mon, Sep 28, 5:39 PM
Unknown Object (File)
Mon, Sep 28, 4:07 PM
Unknown Object (File)
Mon, Sep 28, 2:08 PM
Unknown Object (File)
Mon, Sep 28, 1:37 PM

Details

Summary

Use the start of change when searching for a function rather than the
start of the context. In short functions if this could result in search
for the function name starting from before the function definition.

This was exposed by
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262086

Test Plan

This fixes the previously failing diff functioname test, all other tests pass.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

thj requested review of this revision.Feb 21 2022, 11:19 AM

minor format question. Change looks correct.

usr.bin/diff/diffreg.c
1566

why add the extra blank line?

This revision is now accepted and ready to land.Feb 22 2022, 1:06 PM
mhorne added inline comments.
usr.bin/diff/diffreg.c
1465