aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/file_id.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mac/file_id.cc')
-rw-r--r--src/common/mac/file_id.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc
index 50502e4c..b81cf834 100644
--- a/src/common/mac/file_id.cc
+++ b/src/common/mac/file_id.cc
@@ -90,8 +90,10 @@ void FileID::ConvertIdentifierToString(const unsigned char identifier[16],
if (idx == 4 || idx == 6 || idx == 8 || idx == 10)
buffer[buffer_idx++] = '-';
- buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi;
- buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo;
+ buffer[buffer_idx++] =
+ static_cast<char>((hi >= 10) ? ('A' + hi - 10) : ('0' + hi));
+ buffer[buffer_idx++] =
+ static_cast<char>((lo >= 10) ? ('A' + lo - 10) : ('0' + lo));
}
// NULL terminate