summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-10-22 12:34:30 +1100
committer Vas Crabb <vas@vastheman.com>2017-10-22 12:34:30 +1100
commit4c29419cab5f44db1d52e5f28cef42450406be2a (patch)
tree33939159a0d389f16e0e8f58a1acc86f7d44f263 /src/tools
parentb39e7a994136b459905388496a94beff2f3810bd (diff)
srcclean (nw)
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/imgtool/imgtool.cpp8
-rw-r--r--src/tools/imgtool/library.h6
-rw-r--r--src/tools/imgtool/modules/fat.cpp12
-rw-r--r--src/tools/imgtool/modules/prodos.cpp12
4 files changed, 19 insertions, 19 deletions
diff --git a/src/tools/imgtool/imgtool.cpp b/src/tools/imgtool/imgtool.cpp
index 75aafe0d25d..67283ce8fa3 100644
--- a/src/tools/imgtool/imgtool.cpp
+++ b/src/tools/imgtool/imgtool.cpp
@@ -753,7 +753,7 @@ void imgtool::partition::get_attribute_name(uint32_t attribute, const imgtool_at
//-------------------------------------------------
-// test_imgtool_datetime - unit test for imgtool::datetime
+// test_imgtool_datetime - unit test for imgtool::datetime
//-------------------------------------------------
static bool test_imgtool_datetime(int second, int minute, int hour, int day_of_month, int month, int year)
@@ -806,7 +806,7 @@ static bool test_imgtool_datetime(int second, int minute, int hour, int day_of_m
//-------------------------------------------------
-// test_imgtool_datetime - unit tests for imgtool::datetime
+// test_imgtool_datetime - unit tests for imgtool::datetime
//-------------------------------------------------
static bool test_imgtool_datetime()
@@ -814,9 +814,9 @@ static bool test_imgtool_datetime()
bool error = false;
// various test cases for imgtool::datetime
- if (test_imgtool_datetime(34, 23, 12, 18, 3, 1993)) // March 18th, 1993 12:23:34
+ if (test_imgtool_datetime(34, 23, 12, 18, 3, 1993)) // March 18th, 1993 12:23:34
error = true;
- if (test_imgtool_datetime(0, 20, 16, 25, 12, 1976)) // December 25th, 1976 16:20:00
+ if (test_imgtool_datetime(0, 20, 16, 25, 12, 1976)) // December 25th, 1976 16:20:00
error = true;
return error;
diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h
index cf1e16a111b..c709a70201b 100644
--- a/src/tools/imgtool/library.h
+++ b/src/tools/imgtool/library.h
@@ -112,9 +112,9 @@ namespace imgtool
time_t to_time_t() const;
private:
- static imgtool_clock::duration s_gmt_offset;
- datetime_type m_type;
- std::chrono::time_point<imgtool_clock> m_time_point;
+ static imgtool_clock::duration s_gmt_offset;
+ datetime_type m_type;
+ std::chrono::time_point<imgtool_clock> m_time_point;
static imgtool_clock::duration calculate_gmt_offset();
};
diff --git a/src/tools/imgtool/modules/fat.cpp b/src/tools/imgtool/modules/fat.cpp
index 3dcdd1e5301..e1b3a914c2b 100644
--- a/src/tools/imgtool/modules/fat.cpp
+++ b/src/tools/imgtool/modules/fat.cpp
@@ -1244,12 +1244,12 @@ static void fat_cannonicalize_sfn(char *sfn, const uint8_t *sfn_bytes)
static imgtool::datetime fat_crack_time(uint32_t fat_time)
{
util::arbitrary_datetime dt;
- dt.second = ((fat_time >> 0) & 0x001F) * 2;
- dt.minute = ((fat_time >> 5) & 0x003F);
- dt.hour = ((fat_time >> 11) & 0x001F);
- dt.day_of_month = ((fat_time >> 16) & 0x001F);
- dt.month = ((fat_time >> 21) & 0x000F);
- dt.year = ((fat_time >> 25) & 0x007F) + 1980;
+ dt.second = ((fat_time >> 0) & 0x001F) * 2;
+ dt.minute = ((fat_time >> 5) & 0x003F);
+ dt.hour = ((fat_time >> 11) & 0x001F);
+ dt.day_of_month = ((fat_time >> 16) & 0x001F);
+ dt.month = ((fat_time >> 21) & 0x000F);
+ dt.year = ((fat_time >> 25) & 0x007F) + 1980;
return imgtool::datetime(imgtool::datetime::LOCAL, dt);
}
diff --git a/src/tools/imgtool/modules/prodos.cpp b/src/tools/imgtool/modules/prodos.cpp
index f5b27537671..6db41ae529b 100644
--- a/src/tools/imgtool/modules/prodos.cpp
+++ b/src/tools/imgtool/modules/prodos.cpp
@@ -189,12 +189,12 @@ enum creation_policy_t
static imgtool::datetime prodos_crack_time(uint32_t prodos_time)
{
util::arbitrary_datetime dt;
- dt.second = 0;
- dt.minute = ((prodos_time >> 16) & 0x3F);
- dt.hour = ((prodos_time >> 24) & 0x1F);
- dt.day_of_month = ((prodos_time >> 0) & 0x1F);
- dt.month = ((prodos_time >> 5) & 0x0F) + 1;
- dt.year = ((prodos_time >> 9) & 0x7F) + 1900;
+ dt.second = 0;
+ dt.minute = ((prodos_time >> 16) & 0x3F);
+ dt.hour = ((prodos_time >> 24) & 0x1F);
+ dt.day_of_month = ((prodos_time >> 0) & 0x1F);
+ dt.month = ((prodos_time >> 5) & 0x0F) + 1;
+ dt.year = ((prodos_time >> 9) & 0x7F) + 1900;
if (dt.year <= 1949)
dt.year += 100;