"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/vnstat_tests.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).

vnstat_tests.c  (vnstat-2.7):vnstat_tests.c  (vnstat-2.8)
#include "common.h" #include "common.h"
#include "cfg.h"
#include "vnstat_tests.h" #include "vnstat_tests.h"
#include "common_tests.h" #include "common_tests.h"
#include "dbsql_tests.h" #include "dbsql_tests.h"
#include "database_tests.h" #include "database_tests.h"
#include "config_tests.h" #include "config_tests.h"
#include "ifinfo_tests.h" #include "ifinfo_tests.h"
#include "misc_tests.h" #include "misc_tests.h"
#include "daemon_tests.h" #include "daemon_tests.h"
#include "datacache_tests.h" #include "datacache_tests.h"
#include "fs_tests.h" #include "fs_tests.h"
skipping to change at line 82 skipping to change at line 83
Suite *s = suite_create("fork status check"); Suite *s = suite_create("fork status check");
SRunner *sr = srunner_create(s); SRunner *sr = srunner_create(s);
if (srunner_fork_status(sr) == CK_NOFORK) { if (srunner_fork_status(sr) == CK_NOFORK) {
printf("Error: Tests require Check to have fork mode enabled.\n") ; printf("Error: Tests require Check to have fork mode enabled.\n") ;
exit(1); exit(1);
} }
srunner_free(sr); srunner_free(sr);
} }
void setup(void) { void setup(void) {
defaultcfg();
debug = 0; debug = 0;
} }
void teardown(void) { void teardown(void) {
return; return;
} }
void suppress_output(void) void suppress_output(void)
{ {
if (!output_suppressed) { if (!output_suppressed) {
skipping to change at line 356 skipping to change at line 358
struct tm stm; struct tm stm;
memset(&stm, 0, sizeof(struct tm)); memset(&stm, 0, sizeof(struct tm));
stm.tm_year = year - 1900; stm.tm_year = year - 1900;
stm.tm_mon = month - 1; stm.tm_mon = month - 1;
stm.tm_mday = day; stm.tm_mday = day;
stm.tm_hour = hour; stm.tm_hour = hour;
stm.tm_min = minute; stm.tm_min = minute;
stm.tm_isdst = -1; stm.tm_isdst = -1;
return (uint64_t)mktime(&stm); if (cfg.useutc) {
return (uint64_t)timegm(&stm);
} else {
return (uint64_t)mktime(&stm);
}
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 7 lines changed or added

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