lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 13 Nov 2012 14:24:01 -0500 (EST) From: David Miller <davem@...emloft.net> To: ordex@...istici.org Cc: netdev@...r.kernel.org, b.a.t.m.a.n@...ts.open-mesh.org, simon.wunderlich@...03.tu-chemnitz.de, siwu@....tu-chemnitz.de Subject: Re: [PATCH 01/11] batman-adv: don't rely on positions in struct for hashing From: Antonio Quartulli <ordex@...istici.org> Date: Tue, 13 Nov 2012 10:15:29 +0100 > @@ -37,18 +37,26 @@ static void batadv_bla_periodic_work(struct work_struct *work); > static void batadv_bla_send_announce(struct batadv_priv *bat_priv, > struct batadv_backbone_gw *backbone_gw); > > +static inline void hash_bytes(uint32_t *hash, void *data, uint32_t size) > +{ > + const unsigned char *key = data; > + int i; > + > + for (i = 0; i < size; i++) { > + *hash += key[i]; > + *hash += (*hash << 10); > + *hash ^= (*hash >> 6); > + } > +} > + Remove the inline tag. Return the uint32_t resulting hash value rather than passing it by reference. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists