]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
update
authorhadaq <hadaq>
Fri, 9 Jul 2010 16:48:23 +0000 (16:48 +0000)
committerhadaq <hadaq>
Fri, 9 Jul 2010 16:48:23 +0000 (16:48 +0000)
libtrbnet/trbnet.c

index 1f98b4cf254d625a83a78554b5f9d6c19234fbe1..c982f4f5fe442c8d4fb82ea417b556b4cf2b02a1 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 2.67 $";
+const char trbnet_version[] = "$Revision: 2.68 $";
 
 #include <stdlib.h>
 #include <signal.h>
@@ -941,7 +941,9 @@ static int lockPorts(int masterLock)
     SEM_UNDO     /* sem_flg: remove lock if process gets killed           */
   };
   
-  if ((master_lock == 1) && (masterLock == 0)) return 0;
+  if ((master_lock == 1) && (masterLock == 0)) {
+    return 0;
+  }
   
   /* Wait for semaphore and lock it */
   if (semop(semid, &sops, 1) == -1) {
@@ -956,7 +958,7 @@ static int lockPorts(int masterLock)
   fifoToggleBit = readPC() & FIFO_TOGGLE_BIT;
  
   if (masterLock != 0) master_lock = 1;
-
+  
   return 0;
 }
 
@@ -967,8 +969,10 @@ static int unlockPorts(int masterLock)
     1,                     /* sem_op: decrement semaphore, i.e. unlock it  */
     SEM_UNDO               /*  */
   };
-
-  if ((master_lock == 1) && (masterLock == 0)) return 0;
+  
+  if ((master_lock == 1) && (masterLock == 0)) {
+    return 0;
+  }
 
   /* Release semaphore */
   if (semop(semid, &sops, 1) == -1) {