From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 23 Mar 2012 07:41:28 +0100 From: Andrew Lunn Message-ID: <20120323064128.GC5662@lunn.ch> References: <201203222250.31309.lindner_marek@yahoo.de> <1332453075-27999-1-git-send-email-lindner_marek@yahoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1332453075-27999-1-git-send-email-lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] [RFC 1/5] batman-adv: ELP - adding basic infrastructure Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking Cc: Marek Lindner > +static int bat_v_elp_iface_enable(struct hard_iface *hard_iface) > +{ > + struct batman_elp_packet *elp_packet; > + unsigned long random_seqno; ... > + /* randomize initial seqno to avoid collision */ > + get_random_bytes(&random_seqno, sizeof(unsigned long)); > + atomic_set(&hard_iface->elp_seqno, (uint32_t)random_seqno); Hi Marek Why not just make random_seqno a uint32_t and avoid the cast? Andrew