Go to file
Carlos R. Mafra cd4947f139 wmnet: Cope with interface name longer than 6 characters
After a recent change in the kernel (their commit 6e094bd) my
wireless interface name is 8 characters long, wlp3s0b1. But
the wmnet code to read the received bytes

	totalbytes_in = strtoul(&buffer[7], NULL, 10);

assumed that the interface name in /proc/net/dev would be 6 characters
long (and would start reading at position 7).

In the linux kernel mailing list I reported the regression and none
other than Al Viro replied,

> I am not sure if 'wmnet' could do this better (any suggestions?),

*snort*

well, yes - it's called scanf().  And if one is really, really nervous
about the overhead of <gasp> parsing a bunch of integers (as if fopen/
fgets/fclose alone won't cost enough to make constantly calling that
sucker a bad idea), just use ptr + <something> - 6 instead of
&buffer[<something>] in there.  That thing has just found where the
colon was (and replaced it with NUL), so dealing with "the first field
turned out to be too long and shifted everything past it" isn't hard.

******

I also took the oportunity to remove the unused variables diffpackets_{in,out}
2015-01-11 13:16:40 +00:00
AlsaMixer.app Keep mute state from getting out of sync with reality 2014-12-04 10:18:32 +00:00
libdockapp libdockapp: Release version 0.6.4. 2014-11-28 16:39:20 +00:00
Temperature.app Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmacpi wmacpi: Bump to version 2.3. 2014-11-24 09:35:58 +00:00
wmacpiload Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmauda Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmbatteries Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmbattery wmbattery: Bump to version 2.45. 2014-10-05 19:18:50 +01:00
wmbiff wmbiff: Release version 0.4.28. 2014-11-08 11:20:02 +00:00
wmbutton Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcalc wmcalc: Bump to version 0.5. 2015-01-10 19:02:57 +00:00
wmCalClock Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcalendar Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcdplay wmcdplay: Bump to version 1.1. 2014-12-18 18:43:10 +00:00
wmckgmail Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmcliphist wmcliphist: Release version 2.1. 2014-11-23 10:26:23 +00:00
wmclock wmclock: Bump to version 1.0.15. 2014-12-11 15:40:21 +00:00
wmcpufreq editing changelog 2014-11-20 23:16:04 +00:00
wmcpuload Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmfemon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmfu Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmifinfo wmifinfo: Bump to version 0.10. 2014-12-09 11:17:56 +00:00
wmifs wmifs: Bump to version 1.4. 2014-10-23 08:03:32 +01:00
wmitime wmitime: Bump to version 0.4. 2014-12-20 09:55:06 +00:00
wmix Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmkeys Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmMatrix Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmmemload wmmemload: Release version 0.1.7. 2014-10-10 10:09:53 +01:00
wmmixer Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmmixer-alsa wmmixer-alsa: Add to repository. 2014-08-06 13:23:10 -06:00
wmmon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmmoonclock Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmnet wmnet: Cope with interface name longer than 6 characters 2015-01-11 13:16:40 +00:00
wmnotify Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmpager Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmpower Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmppp.app wmppp.app: Update support email address and webpage. 2014-09-15 11:30:07 +01:00
wmsm.app Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmsmixer Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmSMPmon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmstickynotes Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmsupermon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmtime wmtime: Bump to version 1.2. 2015-01-03 22:31:44 +00:00
wmtv Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmtz Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmWeather Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmweather+ Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmwifi Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
wmwlmon Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
dockapps.db.in Add wmcalc information for dockapps webpage. 2015-01-10 20:45:59 +00:00
update-dockapps.pl Fix warning in update-dockapps.pl. 2014-11-23 13:30:02 +00:00