smbd: Avoid a DEBUGADD statement
authorVolker Lendecke <vl@samba.org>
Tue, 21 Dec 2021 16:12:55 +0000 (17:12 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 5 Jan 2022 00:11:37 +0000 (00:11 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/filename.c

index 327df426e12c4808b86e312ee6aee2ce5cf8125f..53c58d6e80a66ec58a163518157d2a1ca4d421d9 100644 (file)
@@ -1715,14 +1715,19 @@ static NTSTATUS build_stream_path(TALLOC_CTX *mem_ctx,
        }
 
        for (i=0; i<num_streams; i++) {
-               DEBUG(10, ("comparing [%s] and [%s]: ",
-                          smb_fname->stream_name, streams[i].name));
-               if (sname_equal(smb_fname->stream_name, streams[i].name,
-                               conn->case_sensitive)) {
-                       DEBUGADD(10, ("equal\n"));
+               bool equal = sname_equal(
+                       smb_fname->stream_name,
+                       streams[i].name,
+                       conn->case_sensitive);
+
+               DBG_DEBUG("comparing [%s] and [%s]: %sequal\n",
+                         smb_fname->stream_name,
+                         streams[i].name,
+                         equal ? "" : "not ");
+
+               if (equal) {
                        break;
                }
-               DEBUGADD(10, ("not equal\n"));
        }
 
        /* Couldn't find the stream. */