From 5ccceaa9c47a0a17627e9ea4eb59f956b0892f8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 9 Feb 2023 13:43:05 -0500
Subject: [PATCH] misc: cleanup

Change-Id: Ic28d57b6f054f58b1d605140287ffb0d06c84a73
---
 src/jamidht/gitserver.cpp     | 1 -
 src/jamidht/jamiaccount.cpp   | 4 ++--
 src/jamidht/namedirectory.cpp | 3 ++-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/jamidht/gitserver.cpp b/src/jamidht/gitserver.cpp
index 6aca8f7e9b..343fb9812b 100644
--- a/src/jamidht/gitserver.cpp
+++ b/src/jamidht/gitserver.cpp
@@ -33,7 +33,6 @@
 using namespace std::string_view_literals;
 constexpr auto FLUSH_PKT = "0000"sv;
 constexpr auto NAK_PKT = "0008NAK\n"sv;
-constexpr auto DONE_PKT = "0009done\n"sv;
 constexpr auto DONE_CMD = "done\n"sv;
 constexpr auto WANT_CMD = "want"sv;
 constexpr auto HAVE_CMD = "have"sv;
diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp
index ad6e850127..8c7a217a67 100644
--- a/src/jamidht/jamiaccount.cpp
+++ b/src/jamidht/jamiaccount.cpp
@@ -3473,8 +3473,8 @@ JamiAccount::startAccountDiscovery()
                     dp.cleanupTask->cancel();
                 } else {
                     // Avoid Repeat Reception of Same peer
-                    JAMI_INFO("Account discovered: %s: %s",
-                              v.displayName.c_str(),
+                    JAMI_LOG("Account discovered: {}: {}",
+                              v.displayName,
                               v.accountId.to_c_str());
                     // Send Added Peer and corrsponding accoundID
                     emitSignal<libjami::PresenceSignal::NearbyPeerNotification>(getAccountID(),
diff --git a/src/jamidht/namedirectory.cpp b/src/jamidht/namedirectory.cpp
index 30acc7e2ae..6a02706354 100644
--- a/src/jamidht/namedirectory.cpp
+++ b/src/jamidht/namedirectory.cpp
@@ -37,6 +37,7 @@
 #include <opendht/log_enable.h>
 #include <opendht/thread_pool.h>
 
+#include <cstddef>
 #include <msgpack.hpp>
 #include <json/json.h>
 
@@ -61,7 +62,7 @@ const std::regex URI_VALIDATOR {
     "^([a-zA-Z]+:(?://)?)?(?:([a-z0-9-_]{1,64})@)?([a-zA-Z0-9\\-._~%!$&'()*+,;=:\\[\\]]+)"};
 const std::regex NAME_VALIDATOR {"^[a-zA-Z0-9-_]{3,32}$"};
 
-constexpr size_t MAX_RESPONSE_SIZE {1024 * 1024};
+constexpr size_t MAX_RESPONSE_SIZE {1024ul * 1024};
 
 using Request = dht::http::Request;
 
-- 
GitLab