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
Unknown Object (File)
Fri, Apr 19, 5:17 AM
Unknown Object (File)
Feb 15 2024, 9:21 PM
Unknown Object (File)
Dec 20 2023, 2:27 AM
Unknown Object (File)
Dec 12 2023, 4:40 AM
Unknown Object (File)
Nov 5 2023, 5:25 PM
Unknown Object (File)
Oct 11 2023, 6:49 PM
Unknown Object (File)
Oct 4 2023, 4:24 PM
Unknown Object (File)
Sep 25 2023, 7:29 AM

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