[haiku-commits] Re: haiku: hrev46445 - src/kits/network/libnetapi

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 25 Nov 2013 21:57:53 +0100

Am 25/11/2013 18:42, schrieb korli@xxxxxxxxxxxxxxxx:
-       if (transparent)
-               fSynchronousListener
+
+       if (transparent)
+               fSynchronousListener
                        = new(std::nothrow) 
BUrlProtocolDispatchingListener(this);

Looks like you missed a few: this is a multiline statement, and therefore deserves {}.

        BUrlRequest* caller;
        if (message->FindPointer(kUrlProtocolCaller,
                reinterpret_cast<void**>(&caller)) != B_OK)
                return;

Is that cast really needed? And if it is, the second if-line should be indented one tab further than the next line.

        int8 notification;
-       if (message->FindInt8(kUrlProtocolMessageType, &notification)
+       if (message->FindInt8(kUrlProtocolMessageType, &notification)
                != B_OK)
                return;

Same indenting issue here.

                case B_URL_PROTOCOL_HOSTNAME_RESOLVED:
                        {
                                const char* ip;
                                message->FindString("url:ip", &ip);
-                               
+
                                HostnameResolved(caller, ip);
                        }
                        break;

The {} are not to be indented.

Bye,
   Axel.


Other related posts: