X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Ftests_pass_valgrind.c;h=4c4338b6c1c6d3ab20ad9e93a61cdf3da8361c78;hb=100444225380d3f5ca29424ea54703d308c7c651;hp=4365f2a60227bc1a259ad4671d23efa72f87f0e9;hpb=e70eae05572ae0e7ae119ad02b278f73d4c583dc;p=ccan-lca-2011.git diff --git a/tools/ccanlint/tests/tests_pass_valgrind.c b/tools/ccanlint/tests/tests_pass_valgrind.c index 4365f2a..4c4338b 100644 --- a/tools/ccanlint/tests/tests_pass_valgrind.c +++ b/tools/ccanlint/tests/tests_pass_valgrind.c @@ -52,11 +52,11 @@ static bool blank_line(const char *line) static char *get_leaks(const char *output, char **errs) { char *leaks = talloc_strdup(output, ""); - unsigned int i, num; - char **lines = strsplit(output, output, "\n", &num); + unsigned int i; + char **lines = strsplit(output, output, "\n"); *errs = talloc_strdup(output, ""); - for (i = 0; i < num; i++) { + for (i = 0; i < talloc_array_length(lines) - 1; i++) { if (strstr(lines[i], " lost ")) { /* A leak... */ if (strstr(lines[i], " definitely lost ")) {