X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fgetdate.y;h=a4a445da03112ebe0d192cee1148a5cdda3fa434;hb=e1bb3dab9a2dca414eab231c33afd3fad19e7924;hp=ec8c192507be4cab69283fc37b6c2506d2f1be04;hpb=de95bdc2790c1c230c09bc6d3f626fcac9d145f0;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index ec8c19250..a4a445da0 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -1077,7 +1078,7 @@ get_date (struct timespec *result, char const *p, struct timespec const *now) char const *tzbase = p + 4; size_t tzsize = 1; char const *s; - + for (s = tzbase; *s; s++, tzsize++) if (*s == '\\') { @@ -1307,8 +1308,8 @@ get_date (struct timespec *result, char const *p, struct timespec const *now) int month = tm.tm_mon + pc.rel_month; int day = tm.tm_mday + pc.rel_day; if (((year < tm.tm_year) ^ (pc.rel_year < 0)) - | (month < tm.tm_mon) ^ (pc.rel_month < 0) - | (day < tm.tm_mday) ^ (pc.rel_day < 0)) + | ((month < tm.tm_mon) ^ (pc.rel_month < 0)) + | ((day < tm.tm_mday) ^ (pc.rel_day < 0))) goto fail; tm.tm_year = year; tm.tm_mon = month; @@ -1365,8 +1366,6 @@ get_date (struct timespec *result, char const *p, struct timespec const *now) #if TEST -#include - int main (int ac, char **av) {