diff options
| author | Antonio Quartulli <[email protected]> | 2013-05-19 12:55:16 +0200 |
|---|---|---|
| committer | Antonio Quartulli <[email protected]> | 2013-10-12 11:59:23 +0200 |
| commit | 293e93385e024be71500c9480ef85d6199459d17 (patch) | |
| tree | da710c595953f0442c0a2b18dd2f7723d8a5ee7d /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | ee75ed88879af88558818a5c6609d85f60ff0df4 (diff) | |
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 <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Acked-by: Simon Wunderlich <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions