[Nbd] [PATCH 2/2] nbd-server: fix append_serve() to accept a const server pointer
- To: nbd-general@lists.sourceforge.net
- Subject: [Nbd] [PATCH 2/2] nbd-server: fix append_serve() to accept a const server pointer
- From: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@...1261...>
- Date: Tue, 1 Jan 2013 21:21:33 +0200
- Message-id: <c940ecd2fef1d4f287003e97507a3a6888468e9d.1357065645.git.tuomasjjrasanen@...1261...>
- In-reply-to: <b9b5497402b5a8d304f2d93bc88d79344586876d.1357065645.git.tuomasjjrasanen@...1261...>
- References: <b9b5497402b5a8d304f2d93bc88d79344586876d.1357065645.git.tuomasjjrasanen@...1261...>
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: