Baruch Siach <[email protected]> wrote on 2011/09/07 06:29:32: > > Hi Joakim, > > On Mon, Sep 05, 2011 at 10:09:14PM +0200, Joakim Tjernlund wrote: > > > From: Baruch Siach <[email protected]> > > > > > > Use a single IP checksum routine for ping, traceroute and udhcp. > > > > > > Signed-off-by: Baruch Siach <[email protected]> > > > --- > > > > > > Changes from v1: > > > Fix inet_cksum() with odd length on big endian systems > > > Remove declaration of removed udhcp_checksum() > > > > This looks like it is from quagga. I cleaned that up/optimized it > > some years ago into this(you might want to fix the types): > > What is the advantage of this implementation over the one I suggested (which I > took from the traceroute code)?
It is cleaner. Optimizes better(at least on RISC like archs). I am not sure if this is allowed on modern gcc's: *(uint8_t*)&tmp = *(uint8_t*)w; You can drop the pre increment if you like. Jocke _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
