summaryrefslogtreecommitdiff
path: root/cachegrind
diff options
context:
space:
mode:
authornjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-09-13 00:46:27 +0000
committernjn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9>2005-09-13 00:46:27 +0000
commitd111d100b250215516c66f0fceda76815191afa0 (patch)
treef24e06a3633eb068fd9d3362489171474418251d /cachegrind
parent10c122ebdb388e77c47efd7bc4c6ab7c76278354 (diff)
Don't print the client's argv[i] if it's null, and related changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4629 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'cachegrind')
-rw-r--r--cachegrind/cg_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c
index 98970562..084bd9d7 100644
--- a/cachegrind/cg_main.c
+++ b/cachegrind/cg_main.c
@@ -896,10 +896,10 @@ static void fprint_CC_table_and_calc_totals(void)
VG_(strcpy)(buf, "cmd:");
VG_(write)(fd, (void*)buf, VG_(strlen)(buf));
for (i = 0; i < VG_(client_argc); i++) {
- if (VG_(client_argv)[i] == NULL)
- continue;
- VG_(write)(fd, " ", 1);
- VG_(write)(fd, VG_(client_argv)[i], VG_(strlen)(VG_(client_argv)[i]));
+ if (VG_(client_argv)[i]) {
+ VG_(write)(fd, " ", 1);
+ VG_(write)(fd, VG_(client_argv)[i], VG_(strlen)(VG_(client_argv)[i]));
+ }
}
// "events:" line
VG_(sprintf)(buf, "\nevents: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw\n");