From: "Crístian Viana" <vianac@linux.vnet.ibm.com>
To: QEMU Development ML <qemu-devel@nongnu.org>
Cc: "Michael Roth" <mdroth@linux.vnet.ibm.com>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Crístian Viana" <vianac@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/1] Remove unnecessary strlen in qga/channel-posix.c
Date: Fri, 6 Jul 2012 17:12:26 -0300 [thread overview]
Message-ID: <1341605546-3774-1-git-send-email-vianac@linux.vnet.ibm.com> (raw)
The third parameter of unix_listen in the line:
int fd = unix_listen(path, NULL, strlen(path));
makes an unnecessary call to strlen. That parameter will not be used unless
the second parameter is not NULL, which is not the case here.
---
qga/channel-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/channel-posix.c b/qga/channel-posix.c
index 57eea06..ba9c8a6 100644
--- a/qga/channel-posix.c
+++ b/qga/channel-posix.c
@@ -181,7 +181,7 @@ static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethod
break;
}
case GA_CHANNEL_UNIX_LISTEN: {
- int fd = unix_listen(path, NULL, strlen(path));
+ int fd = unix_listen(path, NULL, 0);
if (fd == -1) {
g_critical("error opening path: %s", strerror(errno));
return false;
--
1.7.9.5
reply other threads:[~2012-07-06 20:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1341605546-3774-1-git-send-email-vianac@linux.vnet.ibm.com \
--to=vianac@linux.vnet.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).