file_server: Clarify code by avoiding a goto
authorAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2012 07:18:45 +0000 (17:18 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 4 Sep 2012 07:52:23 +0000 (09:52 +0200)
As suggested by Ricky Nance <ricky.nance@weaubleau.k12.mo.us>

Andrew Bartlett

file_server/file_server.c

index a3efcb2418d6271504dbd7f161c417c30da6f935..e1560c202db07730ccd65a10b7a48c51080175d4 100644 (file)
@@ -117,15 +117,13 @@ static void s3fs_task_init(struct task_server *task)
                                NULL);
        if (req == NULL) {
                DEBUG(0, ("Failed to start smbd as child daemon\n"));
-               goto failed;
+               task_server_terminate(task, "Failed to startup s3fs smb task", true);
+               return;
        }
 
        tevent_req_set_callback(req, file_server_smbd_done, task);
 
        DEBUG(1,("Started file server smbd with config %s\n", fileserver_conf));
-       return;
-failed:
-       task_server_terminate(task, "Failed to startup s3fs smb task", true);
 }
 
 /* called at smbd startup - register ourselves as a server service */