]> git.ozlabs.org Git - ccan/commitdiff
tally: Fix a c++ warning
authorVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2011 17:43:21 +0000 (19:43 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:09:09 +0000 (10:39 +0930)
(Imported from SAMBA commit cb5c6f441f394f91bedf641aa76841bdb833e440)

ccan/tally/tally.c

index d3d320eb1b0657d0e53bf2d042d49f913f207fdd..2af7353380f9af18221971aba90d1f7648ab8b2b 100644 (file)
@@ -450,7 +450,7 @@ char *tally_histogram(const struct tally *tally,
                        largest_bucket = tally->counts[i];
        }
 
-       p = graph = malloc(height * (width + 1) + 1);
+       p = graph = (char *)malloc(height * (width + 1) + 1);
        if (!graph) {
                free(tmp);
                return NULL;