Re: [PATCHes] CUPS fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastien,

> The CUPS backend would be aborting when scanning for a printer that's
> not in bluetoothd known devices. Fixes both bugs I found in my testing.

can we at least try to keep the coding style. I don't really know what
is so hard about it.

                dbus_message_iter_get_basic(&iter, &name);
+               if (name == NULL ||
+                   strcmp(name, "Discovering") != 0)
+                       return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
                dbus_message_iter_next(&iter);

The NULL check and strcmp can go on the same line here.

                if (!reply)
                        return;
-       } else {
-               if (dbus_message_get_args(reply, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID) == FALSE)
-                       return;
+       }
+       if (dbus_message_get_args(reply, NULL, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID) == FALSE) {
+               return;
        }

I know that the previous one exceeded the 80 char limit, but no need to
keep it.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux