summaryrefslogtreecommitdiffhomepage
path: root/migration/migration.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-28 09:47:36 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-28 09:47:36 +0100
commite9f59b0fa1e6d9abdc832e241f4f43ac165db554 (patch)
treea460f63bbe8903c2fe70571c74837dad6dd680c3 /migration/migration.cpp
parentd65b44413dccb06b9883890d0d994fe86b4253c8 (diff)
migration: check year properly
Diffstat (limited to 'migration/migration.cpp')
-rw-r--r--migration/migration.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/migration/migration.cpp b/migration/migration.cpp
index eda88071..34882390 100644
--- a/migration/migration.cpp
+++ b/migration/migration.cpp
@@ -50,13 +50,13 @@ void migrator::register_migration(mptr const& m)
bool ok = true;
+ const int year_ = to_int(year, ok),
+ month_ = to_int(month, ok),
+ day_ = to_int(day, ok);
- const int month_ = to_int(month, ok), day_ = to_int(day, ok);
+ (void)to_int(serial, ok);
- (void) to_int(year, ok);
- (void) to_int(serial, ok);
-
- if (!ok || year < 1970)
+ if (!ok || year_ < 1970)
abort();
if (month_ < 1 || month_ > 12)