[Olsr-dev] [PATCH v1 1/2] net_olsr: rephrase 'enough space in buffer' condition

Henning Rogge (spam-protected)
Sat Aug 25 12:32:34 CEST 2012


I agree that the 2nd patch is stable material...

but is the first one really necessary?

Henning

On Fri, Aug 24, 2012 at 4:17 PM, Ferry Huberts <(spam-protected)> wrote:
> both patches are meant for the release branch as well
>
>
> On 24-08-12 15:13, Ferry Huberts wrote:
>>
>> From: Ferry Huberts <(spam-protected)>
>>
>> Signed-off-by: Ferry Huberts <(spam-protected)>
>> ---
>>   src/net_olsr.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/net_olsr.c b/src/net_olsr.c
>> index 66e103d..de5d33a 100644
>> --- a/src/net_olsr.c
>> +++ b/src/net_olsr.c
>> @@ -224,7 +224,7 @@ net_output_pending(const struct interface * ifp)
>>   int
>>   net_outbuffer_push(struct interface *ifp, const void *data, const
>> uint16_t size)
>>   {
>> -  if ((ifp->netbuf.pending + size) > ifp->netbuf.maxsize)
>> +  if ((int)size > net_outbuffer_bytes_left(ifp))
>>       return 0;
>>
>>     memcpy(&ifp->netbuf.buff[ifp->netbuf.pending + OLSR_HEADERSIZE], data,
>> size);
>>
>
> --
> Ferry Huberts
>
> --
> Olsr-dev mailing list
> (spam-protected)
> https://lists.olsr.org/mailman/listinfo/olsr-dev



-- 
Steven Hawkings about cosmic inflation: "An increase of billions of
billions of percent in a tiny fraction of a second. Of course, that
was before the present government."




More information about the Olsr-dev mailing list