"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/misc.c" between
vnstat-2.7.tar.gz and vnstat-2.8.tar.gz

About: vnStat is a console-based network traffic monitor (using the /proc filesystem).

misc.c  (vnstat-2.7):misc.c  (vnstat-2.8)
skipping to change at line 548 skipping to change at line 548
mult = (uint64_t)dmonth(u.tm_mon) * 86400; mult = (uint64_t)dmonth(u.tm_mon) * 86400;
} else if (listtype == LT_Year) { } else if (listtype == LT_Year) {
div = (uint64_t)u.tm_yday * 1440 + (uint64_t)u.tm_hour * 60 + (ui nt64_t)u.tm_min; div = (uint64_t)u.tm_yday * 1440 + (uint64_t)u.tm_hour * 60 + (ui nt64_t)u.tm_min;
mult = (uint64_t)(365 + isleapyear(u.tm_year + 1900)) * 1440; mult = (uint64_t)(365 + isleapyear(u.tm_year + 1900)) * 1440;
} }
if (div > 0) { if (div > 0) {
*rx = (uint64_t)((double)datalist_i->rx / (double)div) * mult; *rx = (uint64_t)((double)datalist_i->rx / (double)div) * mult;
*tx = (uint64_t)((double)datalist_i->tx / (double)div) * mult; *tx = (uint64_t)((double)datalist_i->tx / (double)div) * mult;
} }
} }
int ishelprequest(const char *arg)
{
if (strlen(arg) == 0) {
return 0;
}
if (strlen(arg) == 1 && arg[0] == '?') {
return 1;
} else if ((strcmp(arg, "-?") == 0) || (strcmp(arg, "--help") == 0)) {
return 1;
}
return 0;
}
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)