diff options
author | Simon Wunderlich <siwu@hrz.tu-chemnitz.de> | 2010-06-25 18:28:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-08 15:17:32 -0400 |
commit | b6be4535e3e971181e19791e12c62f4938e6d2e9 (patch) | |
tree | ac5bb305d63c120b5e7db33e8dd0e7fbe18ce0a4 /drivers/staging/batman-adv/translation-table.c | |
parent | b26b45845b29d83e7537dcd16827a478f6cee346 (diff) |
Staging: batman-adv: Lower resolution for timeouts
It is enough for our timeouts to keep them in seconds instead of miliseconds.
With a too high resolution, we might even risk an integer overflow, so this
patch should make things more safe.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/translation-table.c')
-rw-r--r-- | drivers/staging/batman-adv/translation-table.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index fdd902d25c7..9e3c845e202 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c | |||
@@ -257,8 +257,7 @@ static void hna_local_purge(struct work_struct *work) | |||
257 | while (hash_iterate(hna_local_hash, &hashit)) { | 257 | while (hash_iterate(hna_local_hash, &hashit)) { |
258 | hna_local_entry = hashit.bucket->data; | 258 | hna_local_entry = hashit.bucket->data; |
259 | 259 | ||
260 | timeout = hna_local_entry->last_seen + | 260 | timeout = hna_local_entry->last_seen + LOCAL_HNA_TIMEOUT * HZ; |
261 | ((LOCAL_HNA_TIMEOUT * HZ) / 1000); | ||
262 | if ((!hna_local_entry->never_purge) && | 261 | if ((!hna_local_entry->never_purge) && |
263 | time_after(jiffies, timeout)) | 262 | time_after(jiffies, timeout)) |
264 | hna_local_del(hna_local_entry, "address timed out"); | 263 | hna_local_del(hna_local_entry, "address timed out"); |