[haiku-development] src_add-ons_kernel_network_protocols_ipv4_ipv4.cpp.diff

Hi there,

trying to fix this warning:
src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp: In method `status_t FragmentPacket::Reassemble(net_buffer *)': src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp:379: warning: converting NULL to non-pointer type

I'm not sure if the patch is correct, the only sure is that the function returns a status_t
and NULL is certainly not a desired returned value,

good bye,
   Vasilis

Index: src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
===================================================================
--- src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp  (revision 25738)
+++ src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp  (working copy)
@@ -376,7 +376,7 @@
 FragmentPacket::Reassemble(net_buffer *to)
 {
        if (!IsComplete())
-               return NULL;
+               return B_ERROR;
 
        net_buffer *buffer = NULL;
 

Other related posts: