[Olsr-dev] [PATCH v1 1/2] net_olsr: rephrase 'enough space in buffer' condition
Ferry Huberts
(spam-protected)
Sat Aug 25 12:44:10 CEST 2012
Did it because you proposed that code. and it cleans up/clarifies a lot
I can drop it though, if you want
On 25-08-12 12:32, Henning Rogge wrote:
> 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
>
>
>
--
Ferry Huberts
More information about the Olsr-dev
mailing list