On Fri, Oct 22, 2010 at 01:15:34 +0200, Denys Vlasenko wrote: > On Thu, Oct 21, 2010 at 12:32 PM, Alexander Shishkin <[email protected]> > wrote: > > Signed-off-by: Alexander Shishkin <[email protected]> > > --- > > procps/pmap.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/procps/pmap.c b/procps/pmap.c > > index cfa94ed..52cf229 100644 > > --- a/procps/pmap.c > > +++ b/procps/pmap.c > > @@ -44,7 +44,7 @@ enum { > > > > static void print_smaprec(struct smaprec *currec, void *data) > > { > > - unsigned opt = (unsigned)data; > > + unsigned opt = *(unsigned *)data; > > This can be fixed without the need for additional dereference. > Just use pointer-sized integer: > > unsigned opt = (uintptr_t)data > > > - ret = procps_read_smaps(pid, &total, print_smaprec, (void*)opt); > > + ret = procps_read_smaps(pid, &total, print_smaprec, &opt); > > And here, use: (void*)(uintptr_t)opt. > Does this work?
Yes, this actually shrinks the code size on arm (unike my version, which increased it). Thanks! Regards, -- Alex _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
