]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Avoid a direct reference to smb_messages[]
authorVolker Lendecke <vl@samba.org>
Thu, 9 Mar 2023 16:49:50 +0000 (17:49 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 3 Jul 2023 19:40:35 +0000 (19:40 +0000)
That's what we have smb_fn_name() for

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

index a25ae9d2767cadd747482e61a933ea3776e8cb39..dd1ff7d4766b7e95221e5bb300b2006ed0429ea0 100644 (file)
@@ -2400,8 +2400,7 @@ static bool smbd_echo_reply(struct smbd_echo_state *state,
        req.inbuf = inbuf;
 
        DEBUG(10, ("smbecho handler got cmd %d (%s)\n", (int)req.cmd,
-                  smb_messages[req.cmd].name
-                  ? smb_messages[req.cmd].name : "unknown"));
+                  smb_fn_name(req.cmd)));
 
        if (req.cmd != SMBecho) {
                return false;