nbd-server: fix dup_serve() to accept a const server pointer
authorTuomas Jorma Juhani Räsänen <tuomasjjrasanen@tjjr.fi>
Tue, 1 Jan 2013 19:21:21 +0000 (21:21 +0200)
committerWouter Verhelst <w@uter.be>
Wed, 2 Jan 2013 07:49:17 +0000 (08:49 +0100)
dup_serve() does not modify the source server (as it should be), so the
pointer should be declared const.

Signed-off-by: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@tjjr.fi>
nbd-server.c

index 03d0f73..de1b20e 100644 (file)
@@ -664,7 +664,7 @@ void remove_server(gpointer s) {
  * @param s the old server we want to duplicate
  * @return new duplicated server
  **/
-SERVER* dup_serve(SERVER *s) {
+SERVER* dup_serve(const SERVER *const s) {
        SERVER *serve = NULL;
 
        serve=g_new0(SERVER, 1);