aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/token.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/token.c b/util/token.c
index 1b839aaa..09702e55 100644
--- a/util/token.c
+++ b/util/token.c
@@ -11,7 +11,7 @@
#include <sys/stat.h>
#include <unistd.h>
-bool generate_token(char out[static TOKEN_STRLEN]) {
+bool generate_token(char out[static TOKEN_SIZE]) {
static FILE *urandom = NULL;
uint64_t data[2];
@@ -31,7 +31,7 @@ bool generate_token(char out[static TOKEN_STRLEN]) {
wlr_log_errno(WLR_ERROR, "Failed to read from random device");
return false;
}
- if (snprintf(out, TOKEN_STRLEN, "%016" PRIx64 "%016" PRIx64, data[0], data[1]) != TOKEN_STRLEN - 1) {
+ if (snprintf(out, TOKEN_SIZE, "%016" PRIx64 "%016" PRIx64, data[0], data[1]) != TOKEN_SIZE - 1) {
wlr_log_errno(WLR_ERROR, "Failed to format hex string token");
return false;
}