From d5a33ccd797ece3375e68b015359549301aeac74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Sat, 23 Sep 2017 11:29:48 +0200 Subject: [PATCH] Switch to use const --- src/node.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/node.cpp b/src/node.cpp index 9a8421d..9bb33f5 100644 --- a/src/node.cpp +++ b/src/node.cpp @@ -29,10 +29,9 @@ dht::DhtRunner node; -void NeoComm_init(unsigned short port) { - if(port == 0) - port = DEFAULT_PORT; - node.run(port, dht::crypto::generateIdentity(), true); +void NeoComm_init(const unsigned short port) { + node.run((port == 0 ? DEFAULT_PORT : port), + dht::crypto::generateIdentity(), true); } void NeoComm_deinit() {