From: "Gustavo F. Padovan" <gustavo@las.ic.unicamp.br>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/6] hcitool: fix error message
Date: Sun, 15 Feb 2009 16:47:22 -0300 [thread overview]
Message-ID: <1234727246-21064-2-git-send-email-gustavo@las.ic.unicamp.br> (raw)
In-Reply-To: <1234727246-21064-1-git-send-email-gustavo@las.ic.unicamp.br>
str only will be NULL if malloc couldn't alloc memory
---
tools/hcitool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 3ba9234..4793c46 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -1861,7 +1861,7 @@ static void cmd_lp(int dev_id, int argc, char **argv)
printf("Link policy settings: %s\n", str);
bt_free(str);
} else {
- fprintf(stderr, "Invalig settings\n");
+ fprintf(stderr, "Can't allocate memory\n");
exit(1);
}
} else {
--
1.6.0.6
next prev parent reply other threads:[~2009-02-15 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 19:47 [PATCH 1/6] Fix more memory leaks in hcitool Gustavo F. Padovan
2009-02-15 19:47 ` Gustavo F. Padovan [this message]
2009-02-15 19:47 ` [PATCH 3/6] Change fprintf(stderr,...) to perror() Gustavo F. Padovan
2009-02-15 19:47 ` [PATCH 4/6] remove verification before free Gustavo F. Padovan
2009-02-15 19:47 ` [PATCH 5/6] Remove unnecessary attribution Gustavo F. Padovan
2009-02-15 19:47 ` [PATCH 6/6] Make expand_name a void function Gustavo F. Padovan
2009-02-16 12:21 ` [PATCH 3/6] Change fprintf(stderr,...) to perror() David Vrabel
2009-02-16 12:37 ` Gustavo F. Padovan
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=1234727246-21064-2-git-send-email-gustavo@las.ic.unicamp.br \
--to=gustavo@las.ic.unicamp.br \
--cc=linux-bluetooth@vger.kernel.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