Remove unnecessary strlen in qga/channel-posix.c
PATCH 1/1 Remove unnecessary strlen in qga/channel-posix.c
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(-)
qga/channel-posix.c +1 -1
@@ -181,7 +181,7 @@ static gboolean ga_channel_open(GAChannel *c, const gchar *path, GAChannelMethodbreak ; }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;
Signature · 1 line
1.7.9.5