Make code safer in case the enumeration is extended in the future. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/reds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/reds.c b/server/reds.c index ec9f9258..5c2e8cb0 100644 --- a/server/reds.c +++ b/server/reds.c @@ -2357,6 +2357,7 @@ static void reds_handle_ssl_accept(int fd, int event, void *data) RedStreamSslStatus return_code = red_stream_ssl_accept(link->stream); switch (return_code) { + default: case RED_STREAM_SSL_STATUS_ERROR: reds_link_free(link); return; @@ -2422,6 +2423,7 @@ static RedLinkInfo *reds_init_client_ssl_connection(RedsState *reds, int socket) case RED_STREAM_SSL_STATUS_OK: reds_handle_new_link(link); return link; + default: case RED_STREAM_SSL_STATUS_ERROR: goto error; case RED_STREAM_SSL_STATUS_WAIT_FOR_READ: -- 2.17.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel