Re: [PATCH] Add discover characteristics by uuid to gattool

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

 



Hi,

On Thu, Mar 17, 2011, Johan Hedberg wrote:
> On Wed, Mar 16, 2011, Sheldon Demario wrote:
> > +		uuid = g_try_new(bt_uuid_t, 1);
> > +		if (bt_string_to_uuid(uuid, argvp[3]) < 0) {
> > +			g_free(uuid);
> > +			printf("Invalid UUID\n");
> > +			return;
> > +		}
> 
> If you're gonna use the _try version of GLib memory allocators you need
> to check for the return value. However in this case I'd just use the
> non-try version (since the amount of memory is small).

Never mind, I just saw that you've sent an updated version which gets
rid of the memory allocation need completely (by using a stack
variable).

Johan
--
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