https://github.com/torvalds/linux
Revision 143cdd8f33909ff5a153e3f02048738c5964ba26 authored by Akinobu Mita on 26 December 2012, 02:32:10 UTC, committed by David S. Miller on 26 December 2012, 22:13:23 UTC
batadv_iv_ogm_emit_send_time() attempts to calculates a random integer in the range of 'orig_interval +- BATADV_JITTER' by the below lines. msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; msecs += (random32() % 2 * BATADV_JITTER); But it actually gets 'orig_interval' or 'orig_interval - BATADV_JITTER' because '%' and '*' have same precedence and associativity is left-to-right. This adds the parentheses at the appropriate position so that it matches original intension. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Antonio Quartulli <ordex@autistici.org> Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Antonio Quartulli <ordex@autistici.org> Cc: b.a.t.m.a.n@lists.open-mesh.org Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cf0be88
Tip revision: 143cdd8f33909ff5a153e3f02048738c5964ba26 authored by Akinobu Mita on 26 December 2012, 02:32:10 UTC
batman-adv: fix random jitter calculation
batman-adv: fix random jitter calculation
Tip revision: 143cdd8
File | Mode | Size |
---|---|---|
caching | ||
configfs | ||
nfs | ||
pohmelfs | ||
00-INDEX | -rw-r--r-- | 4.0 KB |
9p.txt | -rw-r--r-- | 5.6 KB |
Locking | -rw-r--r-- | 21.9 KB |
Makefile | -rw-r--r-- | 217 bytes |
adfs.txt | -rw-r--r-- | 2.6 KB |
affs.txt | -rw-r--r-- | 8.0 KB |
afs.txt | -rw-r--r-- | 7.8 KB |
autofs4-mount-control.txt | -rw-r--r-- | 17.3 KB |
automount-support.txt | -rw-r--r-- | 4.6 KB |
befs.txt | -rw-r--r-- | 3.5 KB |
bfs.txt | -rw-r--r-- | 2.1 KB |
btrfs.txt | -rw-r--r-- | 2.8 KB |
ceph.txt | -rw-r--r-- | 5.6 KB |
cifs.txt | -rw-r--r-- | 2.3 KB |
coda.txt | -rw-r--r-- | 48.6 KB |
cramfs.txt | -rw-r--r-- | 2.5 KB |
debugfs.txt | -rw-r--r-- | 8.1 KB |
devpts.txt | -rw-r--r-- | 5.0 KB |
directory-locking | -rw-r--r-- | 5.0 KB |
dlmfs.txt | -rw-r--r-- | 4.2 KB |
dnotify.txt | -rw-r--r-- | 2.9 KB |
dnotify_test.c | -rw-r--r-- | 772 bytes |
ecryptfs.txt | -rw-r--r-- | 2.3 KB |
efivarfs.txt | -rw-r--r-- | 612 bytes |
exofs.txt | -rw-r--r-- | 8.5 KB |
ext2.txt | -rw-r--r-- | 17.9 KB |
ext3.txt | -rw-r--r-- | 7.8 KB |
ext4.txt | -rw-r--r-- | 25.8 KB |
f2fs.txt | -rw-r--r-- | 18.8 KB |
fiemap.txt | -rw-r--r-- | 9.4 KB |
files.txt | -rw-r--r-- | 4.1 KB |
fuse.txt | -rw-r--r-- | 15.8 KB |
gfs2-glocks.txt | -rw-r--r-- | 10.5 KB |
gfs2-uevents.txt | -rw-r--r-- | 3.7 KB |
gfs2.txt | -rw-r--r-- | 1.8 KB |
hfs.txt | -rw-r--r-- | 2.9 KB |
hfsplus.txt | -rw-r--r-- | 1.7 KB |
hpfs.txt | -rw-r--r-- | 14.8 KB |
inotify.txt | -rw-r--r-- | 10.7 KB |
isofs.txt | -rw-r--r-- | 2.5 KB |
jfs.txt | -rw-r--r-- | 2.3 KB |
locks.txt | -rw-r--r-- | 2.7 KB |
logfs.txt | -rw-r--r-- | 9.6 KB |
mandatory-locking.txt | -rw-r--r-- | 8.0 KB |
ncpfs.txt | -rw-r--r-- | 574 bytes |
nilfs2.txt | -rw-r--r-- | 8.1 KB |
ntfs.txt | -rw-r--r-- | 31.3 KB |
ocfs2.txt | -rw-r--r-- | 4.3 KB |
omfs.txt | -rw-r--r-- | 4.0 KB |
path-lookup.txt | -rw-r--r-- | 18.4 KB |
porting | -rw-r--r-- | 15.8 KB |
proc.txt | -rw-r--r-- | 78.9 KB |
qnx6.txt | -rw-r--r-- | 7.1 KB |
quota.txt | -rw-r--r-- | 3.1 KB |
ramfs-rootfs-initramfs.txt | -rw-r--r-- | 15.8 KB |
relay.txt | -rw-r--r-- | 21.1 KB |
romfs.txt | -rw-r--r-- | 8.3 KB |
seq_file.txt | -rw-r--r-- | 12.0 KB |
sharedsubtree.txt | -rw-r--r-- | 29.0 KB |
spufs.txt | -rw-r--r-- | 20.3 KB |
squashfs.txt | -rw-r--r-- | 10.4 KB |
sysfs-pci.txt | -rw-r--r-- | 5.2 KB |
sysfs-tagging.txt | -rw-r--r-- | 1.8 KB |
sysfs.txt | -rw-r--r-- | 11.6 KB |
sysv-fs.txt | -rw-r--r-- | 7.4 KB |
tmpfs.txt | -rw-r--r-- | 6.5 KB |
ubifs.txt | -rw-r--r-- | 5.1 KB |
udf.txt | -rw-r--r-- | 3.4 KB |
ufs.txt | -rw-r--r-- | 1.2 KB |
vfat.txt | -rw-r--r-- | 14.2 KB |
vfs.txt | -rw-r--r-- | 47.5 KB |
xfs-delayed-logging-design.txt | -rw-r--r-- | 40.5 KB |
xfs.txt | -rw-r--r-- | 10.4 KB |
xip.txt | -rw-r--r-- | 3.0 KB |
Computing file changes ...