From f924ea67ca1bd03c127fe782b4cae641e89cc4a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=BCxen?= Date: Fri, 5 Aug 2011 08:11:27 +0000 Subject: Simplification suggested by Guy. svn path=/trunk/; revision=38351 --- capture_sync.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'capture_sync.c') diff --git a/capture_sync.c b/capture_sync.c index fb062075be..fef2f94ccf 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -125,7 +125,6 @@ static int pipe_read_block(int pipe_fd, char *indicator, int len, char *msg, static const char ** sync_pipe_add_arg(const char **args, int *argc, const char *arg) { - char *temparg; /* Grow the array; "*argc" currently contains the number of string pointers, *not* counting the NULL pointer at the end, so we have to add 2 in order to get the new size of the array, including the @@ -134,8 +133,7 @@ sync_pipe_add_arg(const char **args, int *argc, const char *arg) /* Stuff the pointer into the penultimate element of the array, which is the one at the index specified by "*argc". */ - temparg = g_strdup_printf("%s", arg); - args[*argc] = temparg; + args[*argc] = g_strdup(arg); /* Now bump the count. */ (*argc)++; -- cgit v1.2.3