jmap: fix tools/speed
Minor fixes on top of patch from rocco@tecsiel.it:
Hi Rusty,
latest git version of the file ccan/jmap/tools/speed.c does not
compile.
Please find attacched my own version with the following differences:
1. deleted inclusion of <ccan/jmap/jmap_type.h> which is no longer in ccan/
2. added inclusion of <ccan/time/time.h>
3. added definition of struct jmap_obj in terms of JMAP_MEMBERS();
4. deleted use of macro JMAP_DEFINE_UINTIDX_TYPE() which is no longer needed
5. changed function normalize() to be aligned with ccan/htable/tools/speed.c
6. repleaced gettimeofday() in favour of time_now()
7. added memory cleanup at the end of the program in terms of
jmap_free(jmap);
free(objs);
to be valgrind safe
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Showing
Please register or sign in to comment