s4:torture:raw: fix 'Conditional jump or move' valgrind error.
authorNoel Power <noel.power@suse.com>
Mon, 18 Apr 2016 16:37:57 +0000 (17:37 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 25 Apr 2016 08:35:15 +0000 (10:35 +0200)
commitbb0c4a95df109b49bb546d37b9347c4430d4f2a3
tree8559d98f7f3c251af4ed87110338c805770789e4
parent04d70f5206c782de8b1746e6fb52698cfa337b76
s4:torture:raw: fix 'Conditional jump or move' valgrind error.

smbtorture test raw.bench-tcon.bench-tcon produces the following valgrind
trace

==32163== Conditional jump or move depends on uninitialised value(s)
==32163==    at 0x1F9D61: rate_convert_secs (tconrate.c:149)
==32163==    by 0x1FA04C: torture_bench_treeconnect (tconrate.c:189)
==32163==    by 0x9553F62: wrap_simple_test (torture.c:632)
==32163==    by 0x955368F: internal_torture_run_test (torture.c:442)
==32163==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==32163==    by 0x260121: run_matching (smbtorture.c:110)
==32163==    by 0x25FFE3: run_matching (smbtorture.c:95)
==32163==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==32163==    by 0x261EC1: main (smbtorture.c:665)
==32163==
==32163== Use of uninitialised value of size 8
==32163==    at 0xFB0B0BB: _itoa_word (in /lib64/libc-2.19.so)
==32163==    by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so)
==32163==    by 0xFB15598: printf (in /lib64/libc-2.19.so)
==32163==    by 0x1FA064: torture_bench_treeconnect (tconrate.c:188)
==32163==    by 0x9553F62: wrap_simple_test (torture.c:632)
==32163==    by 0x955368F: internal_torture_run_test (torture.c:442)
==32163==    by 0x9553A6B: torture_run_test_restricted (torture.c:542)
==32163==    by 0x260121: run_matching (smbtorture.c:110)
==32163==    by 0x25FFE3: run_matching (smbtorture.c:95)
==32163==    by 0x260242: torture_run_named_tests (smbtorture.c:143)
==32163==    by 0x261EC1: main (smbtorture.c:665)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/torture/raw/tconrate.c