Re: [PATCH] Fix PTS DID test case TP/SDI/BV-03-I

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

 



Hi,

On Wed, Aug 10, 2011 at 5:06 PM, Arek Lichwa <arkadiusz.lichwa@xxxxxxxxx> wrote:
> +               uint16_t vid = 0x0000, pid = 0x0000, ver = 0x0000, vid_assigner = 0x0000;
> +               int result = EOF;

Btw, you don't really need to initialize the variable here since you
are assigning the return of sscanf right bellow

> +               result = sscanf(did, "%4hx:%4hx:%4hx:%4hx", &vid_assigner, &vid, &pid, &ver);
> +               if (result != EOF && result > 3) {
> +                       register_device_id(vid_assigner, vid, pid, ver);
> +               } else {
> +                       info("DeviceID record not registered");



-- 
Luiz Augusto von Dentz
--
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