diff options
author | fabient <fabient@FreeBSD.org> | 2010-06-05 22:57:53 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-06-05 22:57:53 +0000 |
commit | 0ecf60c0b77f328d007521e54b05d0c3c183a117 (patch) | |
tree | de75faa05fc877292b9775274ef012019b77ebe7 /usr.sbin/pmcstat/pmcpl_calltree.c | |
parent | 28122090a3c8d73d47366b9bce6059f02763a23b (diff) | |
download | FreeBSD-src-0ecf60c0b77f328d007521e54b05d0c3c183a117.zip FreeBSD-src-0ecf60c0b77f328d007521e54b05d0c3c183a117.tar.gz |
Fix warnings found by Coverity.
Found with: Coverity Prevent(tm)
MFC after: 1 month
Diffstat (limited to 'usr.sbin/pmcstat/pmcpl_calltree.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcpl_calltree.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_calltree.c b/usr.sbin/pmcstat/pmcpl_calltree.c index 0955133..b0f1c6e 100644 --- a/usr.sbin/pmcstat/pmcpl_calltree.c +++ b/usr.sbin/pmcstat/pmcpl_calltree.c @@ -896,10 +896,12 @@ pmcpl_ct_node_printchild(struct pmcpl_ct_node *ct) /* Call address, line, sample. */ addr = ct->pct_image->pi_vaddr + ct->pct_func; line = 0; - pmcstat_image_addr2line(ct->pct_image, addr, sourcefile, + if (pmcstat_image_addr2line(ct->pct_image, addr, sourcefile, sizeof(sourcefile), &line, - funcname, sizeof(funcname)); - fprintf(args.pa_graphfile, "%p %u", (void *)addr, line); + funcname, sizeof(funcname))) + fprintf(args.pa_graphfile, "%p %u", (void *)addr, line); + else + fprintf(args.pa_graphfile, "* *"); } else fprintf(args.pa_graphfile, "* *"); |