Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@nokia.com>
To: Sheldon Demario <sheldon.demario@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Add discover characteristics by uuid to gattool
Date: Thu, 17 Mar 2011 14:47:54 +0200	[thread overview]
Message-ID: <20110317124754.GC12238@jh-x301> (raw)
In-Reply-To: <1300297246-11056-1-git-send-email-sheldon.demario@openbossa.org>

Hi Sheldon,

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).

Johan

  parent reply	other threads:[~2011-03-17 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 17:40 [PATCH] Add discover characteristics by uuid to gattool Sheldon Demario
2011-03-16 21:51 ` [PATCH] Add discover characteristics by uuid to gatttool Sheldon Demario
2011-03-16 22:00 ` [PATCH v2] " Sheldon Demario
2011-03-17 12:52   ` Johan Hedberg
2011-03-17 12:47 ` Johan Hedberg [this message]
2011-03-17 12:49   ` [PATCH] Add discover characteristics by uuid to gattool Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110317124754.GC12238@jh-x301 \
    --to=johan.hedberg@nokia.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sheldon.demario@openbossa.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox