[Tarantool-patches] [PATCH 19/22] session: use void for empty args

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 3 17:45:23 MSK 2020


Part-of #4718

Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/box/session.cc |  8 ++++----
 src/box/session.h  | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/box/session.cc b/src/box/session.cc
index 7085cc393..7ba7235fe 100644
--- a/src/box/session.cc
+++ b/src/box/session.cc
@@ -72,7 +72,7 @@ RLIST_HEAD(session_on_disconnect);
 RLIST_HEAD(session_on_auth);
 
 static inline uint64_t
-sid_max()
+sid_max(void)
 {
 	static uint64_t sid_max = 0;
 	/* Return the next sid rolling over the reserved value of 0. */
@@ -160,7 +160,7 @@ session_create(enum session_type type)
 }
 
 struct session *
-session_create_on_demand()
+session_create_on_demand(void)
 {
 	assert(fiber_get_session(fiber()) == NULL);
 
@@ -278,7 +278,7 @@ extern "C" void
 session_settings_init(void);
 
 void
-session_init()
+session_init(void)
 {
 	session_registry = mh_i64ptr_new();
 	if (session_registry == NULL)
@@ -289,7 +289,7 @@ session_init()
 }
 
 void
-session_free()
+session_free(void)
 {
 	if (session_registry)
 		mh_i64ptr_delete(session_registry);
diff --git a/src/box/session.h b/src/box/session.h
index a15434f96..833a457bd 100644
--- a/src/box/session.h
+++ b/src/box/session.h
@@ -46,10 +46,10 @@ struct port;
 struct session_vtab;
 
 void
-session_init();
+session_init(void);
 
 void
-session_free();
+session_free(void);
 
 enum session_type {
 	SESSION_TYPE_BACKGROUND = 0,
@@ -221,7 +221,7 @@ extern struct credentials admin_credentials;
  * trigger to destroy it when this fiber ends.
  */
 struct session *
-session_create_on_demand();
+session_create_on_demand(void);
 
 /*
  * When creating a new fiber, the database (box)
@@ -234,7 +234,7 @@ session_create_on_demand();
  * and create it otherwise.
  */
 static inline struct session *
-current_session()
+current_session(void)
 {
 	struct session *session = fiber_get_session(fiber());
 	if (session == NULL) {
@@ -252,7 +252,7 @@ current_session()
  * user on demand as in current_session() applies.
  */
 static inline struct credentials *
-effective_user()
+effective_user(void)
 {
 	struct fiber *f = fiber();
 	struct credentials *u = f->storage.credentials;
-- 
2.26.2



More information about the Tarantool-patches mailing list