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
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
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
Hi,
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
Hi,
On Thu, Jul 12, 2018 at 01:56:14AM +0800, Antonio Quartulli wrote:
> > Why not just add prototypes at the top?
>
> Because I wanted the result to be clean code :)
Prototypes are clean code :-)
> Imho, prototypes should be used only if really needed (i.e. when
> re-ordering is not an option)
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 reuired adding function prototypes in socket.c to
avoid useless code re-ordering.