[PATCH 1/3] Clean up unused argsz

[email protected]
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
From: Eugene Loh <[email protected]>

Signed-off-by: Eugene Loh <[email protected]>
---
 libdtrace/dt_provider_tp.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libdtrace/dt_provider_tp.c b/libdtrace/dt_provider_tp.c
index 4531a88a8..33821f2c7 100644
--- a/libdtrace/dt_provider_tp.c
+++ b/libdtrace/dt_provider_tp.c
@@ -141,7 +141,6 @@ dt_tp_event_info(dtrace_hdl_t *dtp, FILE *f, int skip, tp_probe_t *tpp,
 	char		*buf = NULL;
 	size_t		bufsz;
 	int		argc;
-	size_t		argsz = 0;
 	dt_argdesc_t	*argv = NULL;
 
 	tpp->id = 0;
@@ -153,8 +152,7 @@ dt_tp_event_info(dtrace_hdl_t *dtp, FILE *f, int skip, tp_probe_t *tpp,
 
 	/*
 	 * Pass 1:
-	 * Determine the event id and the number of arguments (along with the
-	 * total size of all type strings together).
+	 * Determine the event id and the number of arguments.
 	 */
 	argc = -skip;
 	while (getline(&buf, &bufsz, f) >= 0) {
@@ -170,12 +168,6 @@ dt_tp_event_info(dtrace_hdl_t *dtp, FILE *f, int skip, tp_probe_t *tpp,
 		/* We found a field: description - see if we should skip it. */
 		if (argc++ < 0)
 			continue;
-
-		/*
-		 * We over-estimate the space needed (pass 2 will strip off the
-		 * identifier name).
-		 */
-		argsz += strlen(p) + 1;
 	}
 	free(buf);
 	buf = NULL;
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.