Author: vlendec
Date: 2005-07-04 13:20:37 +0000 (Mon, 04 Jul 2005)
New Revision: 8142

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8142

Log:
Get rid of an indentation level... This for loop just consists of a single if
statement. Negate the if condition and "continue".

Volker

Modified:
   trunk/source/smbd/open.c


Changeset:
Modified: trunk/source/smbd/open.c
===================================================================
--- trunk/source/smbd/open.c    2005-07-04 13:19:05 UTC (rev 8141)
+++ trunk/source/smbd/open.c    2005-07-04 13:20:37 UTC (rev 8142)
@@ -712,47 +712,48 @@
                        for(i = 0; i < num_share_modes; i++) {
                                share_mode_entry *share_entry = &old_shares[i];
                                
-                               if (share_modes_identical(&broken_entry->entry,
-                                                         share_entry) && 
-                                   EXCLUSIVE_OPLOCK_TYPE(share_entry->op_type) 
) {
+                               if 
(!(share_modes_identical(&broken_entry->entry,
+                                                           share_entry) && 
+                                     
EXCLUSIVE_OPLOCK_TYPE(share_entry->op_type))) {
+                                       continue;
+                               }
                                        
-                                       /*
-                                        * This should not happen. The target 
left this oplock
-                                        * as exlusive.... The process *must* 
be dead.... 
-                                        */
+                               /*
+                                * This should not happen. The target left this 
oplock
+                                * as exlusive.... The process *must* be 
dead.... 
+                                */
                                        
-                                       DEBUG(0,("open_mode_check: exlusive 
oplock left by "
-                                                "process %d after break ! For 
file %s, "
-                                                "dev = %x, inode = %.0f. 
Deleting it to "
-                                                "continue...\n",
-                                               (int)broken_entry->entry.pid, 
fname,
-                                                (unsigned int)dev, 
(double)inode));
+                               DEBUG(0,("open_mode_check: exlusive oplock left 
by "
+                                        "process %d after break ! For file %s, 
"
+                                        "dev = %x, inode = %.0f. Deleting it 
to "
+                                        "continue...\n",
+                                        (int)broken_entry->entry.pid, fname,
+                                        (unsigned int)dev, (double)inode));
                                        
-                                       if 
(process_exists(broken_entry->entry.pid)) {
-                                               DEBUG(0,("open_mode_check: 
Existent process "
-                                                        "%lu left active 
oplock.\n",
-                                                        (unsigned 
long)broken_entry->entry.pid ));
-                                       }
+                               if (process_exists(broken_entry->entry.pid)) {
+                                       DEBUG(0,("open_mode_check: Existent 
process "
+                                                "%lu left active oplock.\n",
+                                                (unsigned 
long)broken_entry->entry.pid ));
+                               }
                                        
-                                       if (del_share_entry(dev, inode, 
&broken_entry->entry,
-                                                           NULL) == -1) {
-                                               
free_broken_entry_list(broken_entry_list);
-                                               errno = EACCES;
-                                               set_saved_error_triple(ERRDOS, 
ERRbadshare,
-                                                                      
NT_STATUS_SHARING_VIOLATION);
-                                               return -1;
-                                       }
+                               if (del_share_entry(dev, inode, 
&broken_entry->entry,
+                                                   NULL) == -1) {
+                                       
free_broken_entry_list(broken_entry_list);
+                                       errno = EACCES;
+                                       set_saved_error_triple(ERRDOS, 
ERRbadshare,
+                                                              
NT_STATUS_SHARING_VIOLATION);
+                                       return -1;
+                               }
                                        
-                                       /*
-                                        * We must reload the share modes after 
deleting the 
-                                        * other process's entry.
-                                        */
+                               /*
+                                * We must reload the share modes after 
deleting the 
+                                * other process's entry.
+                                */
                                        
-                                       SAFE_FREE(old_shares);
-                                       num_share_modes = get_share_modes(conn, 
dev, inode,
-                                                                         
&old_shares);
-                                       break;
-                               }
+                               SAFE_FREE(old_shares);
+                               num_share_modes = get_share_modes(conn, dev, 
inode,
+                                                                 &old_shares);
+                               break;
                        } /* end for paranoia... */
                } /* end for broken_entry */
                free_broken_entry_list(broken_entry_list);

Reply via email to