On 12/07/18 01:49, Gert Doering wrote:
> Hi,
> On Thu, Jul 12, 2018 at 01:00:42AM +0800, Antonio Quartulli wrote:
>> stream_buf_init(), stream_buf_close() and stream_buf_added()
>> are only used within socket.c, therefore there is noneed to
>> have them declared in socket.h.
>> Make them static and remove useless declarations.
>> This change required some re-ordering of the functions to
>> ensure they were defined before being used, however, no
>> this is just a copy/paste and no function change has been
>> introduced.
> I'm not so happy about the large code move-around here, for small
> benefit (code move-around breaks "git blame" to see which commit
> introduced something, and why).
> Why not just add prototypes at the top?

Because I wanted the result to be clean code :)
Imho, prototypes should be used only if really needed (i.e. when
re-ordering is not an option).

The information about what/why was introduced can still be extracted
with a "git log -S$something_here".

I wouldn't make such a big deal of "breaking git blame" if the changes
slowly move towards cleaner code.

Actually some functions did not strictly needed to be moved, but I
wanted all the stream_buf helpers to be in the same place and not
scattered along socket.c. This can be changed if you think it's too

my 2 cents.


Antonio Quartulli

Attachment: signature.asc
Description: OpenPGP digital signature

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Openvpn-devel mailing list

Reply via email to