[Git][NTPsec/ntpsec][master] tests/calendar: remove unused function.
Gary E. Miller
gitlab at mg.gitlab.com
Thu Apr 6 21:45:09 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
17557750 by Gary E. Miller at 2017-04-06T14:44:51-07:00
tests/calendar: remove unused function.
- - - - -
1 changed file:
- tests/libntp/calendar.c
Changes:
=====================================
tests/libntp/calendar.c
=====================================
--- a/tests/libntp/calendar.c
+++ b/tests/libntp/calendar.c
@@ -18,7 +18,6 @@ TEST_TEAR_DOWN(calendar) {}
#define TEST_ASSERT_GREATER_THAN(a, b) TEST_ASSERT_TRUE(a > b)
static int leapdays(int);
-static bool IsEqualCA(const struct calendar *, const struct calendar *);
static const char *DateToString(const struct calendar *);
static int leapdays(int year) {
@@ -31,25 +30,6 @@ static int leapdays(int year) {
return 0;
}
-
-static
-bool IsEqualCA(const struct calendar *expected, const struct calendar *actual) {
- if (expected->year == actual->year &&
- (!expected->yearday || expected->yearday == actual->yearday) &&
- expected->month == actual->month &&
- expected->monthday == actual->monthday &&
- expected->hour == actual->hour &&
- expected->minute == actual->minute &&
- expected->second == actual->second) {
- return true;
- } else {
- /* coverity[leaked_storage] */
- printf("Expected: %s but was %s\n", CalendarToString(expected), CalendarToString(actual));
- return false;
- }
-}
-
-
static const char *DateToString(const struct calendar *cal) {
char *str = malloc(255);
snprintf(str, 255, "%hu-%u-%u(%u)\n", cal->year, (u_int)cal->month, (u_int)cal->monthday, cal->yearday);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1755775060f4cda94f2eba4309fe8b3644eeea0d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170406/49c477fb/attachment.html>
More information about the vc
mailing list