Replace magic constants with macros.
Makes strlen_s limits clearer.
Change-Id: Iaa7488bdada389f5e50eea40091c541a360ae933
diff --git a/test/hftest/inc/hftest.h b/test/hftest/inc/hftest.h
index 703176c..145c2ed 100644
--- a/test/hftest/inc/hftest.h
+++ b/test/hftest/inc/hftest.h
@@ -66,6 +66,7 @@
#define FAIL(...) HFTEST_FAIL(true, __VA_ARGS__)
/* Service utilities. */
+#define SERVICE_NAME_MAX_LENGTH 64
#define SERVICE_SELECT(vm_id, service, send_buffer) \
HFTEST_SERVICE_SELECT(vm_id, service, send_buffer)
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index 34c73e6..346e496 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -272,7 +272,8 @@
#define HFTEST_SERVICE_SELECT(vm_id, service, send_buffer) \
do { \
struct hf_vcpu_run_return run_res; \
- uint32_t msg_length = strnlen_s(service, 64); \
+ uint32_t msg_length = \
+ strnlen_s(service, SERVICE_NAME_MAX_LENGTH); \
\
/* \
* Let the service configure its mailbox and wait for a \