aboutsummaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strftime.c4
-rw-r--r--time/strptime.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/time/strftime.c b/time/strftime.c
index 690cf2a..898bd6c 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -179,7 +179,7 @@ static const char spaces[16] = " ";
# define memset_space(P, Len) \
do { \
int _len = (Len); \
- \
+ \
do \
{ \
int _this = _len > 16 ? 16 : _len; \
@@ -190,7 +190,7 @@ static const char spaces[16] = " ";
while (_len > 0); \
} while (0)
#else
-# define memset_space(P, Len) memset ((P), ' ', (Len))
+# define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
#endif
#define add(n, f) \
diff --git a/time/strptime.c b/time/strptime.c
index 89cfa8e..fd457af 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -537,7 +537,7 @@ strptime_internal (buf, format, tm, decided)
case 'y':
/* Match year within century. */
get_number (0, 99);
- tm->tm_year = val;
+ tm->tm_year = val >= 50 ? val : val + 100;
break;
case 'Y':
/* Match year including century number. */