[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] [PATCH 2/2] nbd-server: fix append_serve() to accept a const server pointer



Now that dup_server() accepts const pointer, append_serve() can also
accept const pointer. There should not be any need to modify the server
when appending it to the array.

Signed-off-by: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@...1261...>
---
 nbd-server.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nbd-server.c b/nbd-server.c
index 8d37d06..6008a2c 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -699,7 +699,7 @@ SERVER* dup_serve(const SERVER *const s) {
  * @param a server array
  * @return 0 success, -1 error
  */
-int append_serve(SERVER *s, GArray *a) {
+int append_serve(const SERVER *const s, GArray *const a) {
 	SERVER *ns = NULL;
 	struct addrinfo hints;
 	struct addrinfo *ai = NULL;
-- 
1.7.10.4




Reply to: