]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_server: Use correct PRIu16 for printf of a uint16
authorVolker Lendecke <vl@samba.org>
Mon, 3 May 2021 12:59:13 +0000 (14:59 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 4 Jun 2021 16:47:34 +0000 (16:47 +0000)
Don't rely on correct casting

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/rpc_sock_helper.c

index 7308338b71fbf3b18aca7ac54d4ea77ae523c6e9..22a0cd17aeb28b6b0d489617098c62db69ba3577 100644 (file)
@@ -240,7 +240,7 @@ static NTSTATUS dcesrv_create_ncacn_ip_tcp_sockets(
        }
 
        /* Set the port in the endpoint */
-       snprintf(port_str, sizeof(port_str), "%u", port);
+       snprintf(port_str, sizeof(port_str), "%"PRIu16, port);
 
        status = dcerpc_binding_set_string_option(b, "endpoint", port_str);
        if (!NT_STATUS_IS_OK(status)) {