]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Apply some README.Coding to call_trans2findfirst/next()
authorVolker Lendecke <vl@samba.org>
Fri, 9 Jun 2023 07:38:31 +0000 (09:38 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 13 Jun 2023 23:33:39 +0000 (23:33 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_trans2.c

index eab121d691ca5fc806f1ad898f881950ff6a488c..4ed5878da76de8d55181262c1cd2bb96026ac33e 100644 (file)
@@ -1147,8 +1147,9 @@ static void call_trans2findfirst(connection_struct *conn,
                        }
                }
 
-               if (!finished && !out_of_space)
+               if (!finished && !out_of_space) {
                        numentries++;
+               }
 
                /*
                 * As an optimisation if we know we aren't looking
@@ -1157,8 +1158,9 @@ static void call_trans2findfirst(connection_struct *conn,
                 * This speeds up large directory searches. JRA.
                 */
 
-               if(got_exact_match)
-                       finished = True;
+               if (got_exact_match) {
+                       finished = true;
+               }
 
                /* Ensure space_remaining never goes -ve. */
                if (PTR_DIFF(p,pdata) > max_data_bytes) {
@@ -1577,8 +1579,9 @@ static void call_trans2findnext(connection_struct *conn,
                        }
                }
 
-               if (!finished && !out_of_space)
+               if (!finished && !out_of_space) {
                        numentries++;
+               }
 
                /*
                 * As an optimisation if we know we aren't looking
@@ -1587,8 +1590,9 @@ static void call_trans2findnext(connection_struct *conn,
                 * This speeds up large directory searches. JRA.
                 */
 
-               if(got_exact_match)
-                       finished = True;
+               if (got_exact_match) {
+                       finished = true;
+               }
 
                space_remaining = max_data_bytes - PTR_DIFF(p,pdata);
        }