aboutsummaryrefslogtreecommitdiff
path: root/include/stick20_commands.h
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2016-10-31 19:03:30 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2016-11-26 18:56:27 +0100
commitc346ff180244de682e78f49783eab9b296c79de6 (patch)
treee4375ac47275e7181d9a3fc1ba111e3c2ec25601 /include/stick20_commands.h
parentca130e790ecc4e4502eb39e1ab550348eae9bc54 (diff)
downloadlibnitrokey-c346ff180244de682e78f49783eab9b296c79de6.tar.gz
libnitrokey-c346ff180244de682e78f49783eab9b296c79de6.tar.bz2
Code refactoring - named magic numbers (2)
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
Diffstat (limited to 'include/stick20_commands.h')
-rw-r--r--include/stick20_commands.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stick20_commands.h b/include/stick20_commands.h
index f816868..139dc63 100644
--- a/include/stick20_commands.h
+++ b/include/stick20_commands.h
@@ -91,9 +91,9 @@ namespace nitrokey {
};
namespace StorageCommandResponsePayload{
- static const int OUTPUT_CMD_RESULT_STICK20_STATUS_START = 25 + 1;
- static const int payload_absolute_begin = 8;
- static const int padding_size = OUTPUT_CMD_RESULT_STICK20_STATUS_START - payload_absolute_begin;
+ using namespace DeviceResponseConstants;
+ static constexpr auto padding_size =
+ storage_data_absolute_address - header_size;
struct TransmissionData{
uint8_t _padding[padding_size];