OSDN Git Service

obexd/MAP: Fix assigning pointer not value to 0
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 26 Jun 2013 13:08:35 +0000 (16:08 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 26 Jun 2013 13:19:30 +0000 (16:19 +0300)
The fix introduced by 455fb131f08cddc9759c877e38ebff3b4bd975b2 would
leave err value uninitialized and set the pointer to 0 which doesn't
make any sense.

obexd/client/mns.c

index cf2e77e..76a5e24 100644 (file)
@@ -270,7 +270,7 @@ static void *event_report_open(const char *name, int oflag, mode_t mode,
        mns->buffer = g_string_new("");
 
        if (err != NULL)
-               err = 0;
+               *err = 0;
 
        return mns;
 }