From daa052398e31b3ad3f9aecbdb14e3cb417f82c11 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 18 Dec 2021 15:13:10 -0800 Subject: [PATCH] GUACAMOLE-1047: Remove unnecessary use of snprintf() in favor of guacd_log(). --- src/guacd/connection.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/guacd/connection.c b/src/guacd/connection.c index 0350dfbd..a5b98adf 100644 --- a/src/guacd/connection.c +++ b/src/guacd/connection.c @@ -280,13 +280,8 @@ static int guacd_route_connection(guacd_proc_map* map, guac_socket* socket) { /* Warn and ward off client if requested connection does not exist */ if (proc == NULL) { - char message[2048]; - - snprintf(message, sizeof(message), - "Connection \"%s\" does not exist", identifier); - - guacd_log(GUAC_LOG_INFO, message); - guac_protocol_send_error(socket, message, + guacd_log(GUAC_LOG_INFO, "Connection \"%s\" does not exist", identifier); + guac_protocol_send_error(socket, "No such connection.", GUAC_PROTOCOL_STATUS_RESOURCE_NOT_FOUND); }