From: Antonio Quartulli Date: Sun, 19 May 2013 10:55:16 +0000 (+0200) Subject: batman-adv: use htons when possible X-Git-Tag: v3.13-rc1~105^2~191^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=293e93385e024be71500c9480ef85d6199459d17;p=pandora-kernel.git batman-adv: use htons when possible When comparing a network ordered value with a constant, it is better to convert the constant at compile time by means of htons() instead of converting the value at runtime using ntohs(). This refactoring may slightly improve the code performance. Moreover substitute __constant_htons() with htons() since the latter increase readability and it is smart enough to be as efficient as the former Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner Acked-by: Simon Wunderlich --- Reading git-diff-tree failed