]> arthur.barton.de Git - netatalk.git/commitdiff
more stupid if ((a = b()) == C) to (C == (a = b()) changes
authordidg <didg>
Sat, 3 May 2003 20:03:12 +0000 (20:03 +0000)
committerdidg <didg>
Sat, 3 May 2003 20:03:12 +0000 (20:03 +0000)
etc/afpd/appl.c
etc/afpd/desktop.c
etc/afpd/directory.c
etc/afpd/filedir.c

index c17ce29fec6df3fbb0805b795353dce8c9b99e16..2bb23e13aec95d247895750c95dee4cd8c230e7c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: appl.c,v 1.12 2003-03-15 01:34:35 didg Exp $
+ * $Id: appl.c,v 1.13 2003-05-03 20:03:12 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -187,7 +187,7 @@ int         ibuflen, *rbuflen;
 
     memcpy( &did, ibuf, sizeof( did ));
     ibuf += sizeof( did );
-    if (( dir = dirlookup( vol, did )) == NULL ) {
+    if (NULL == ( dir = dirlookup( vol, did )) ) {
         return afp_errno;
     }
 
@@ -197,7 +197,7 @@ int         ibuflen, *rbuflen;
     memcpy( appltag, ibuf, sizeof( appltag ));
     ibuf += sizeof( appltag );
 
-    if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+    if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
         return get_afp_errno(AFPERR_PARAM);
     }
     if ( path_isadir(path) ) {
@@ -273,14 +273,14 @@ int               ibuflen, *rbuflen;
 
     memcpy( &did, ibuf, sizeof( did ));
     ibuf += sizeof( did );
-    if (( dir = dirlookup( vol, did )) == NULL ) {
+    if (NULL == ( dir = dirlookup( vol, did )) ) {
         return afp_errno;
     }
 
     memcpy( creator, ibuf, sizeof( creator ));
     ibuf += sizeof( creator );
 
-    if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+    if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
         return get_afp_errno(AFPERR_PARAM);
     }
     if ( path_isadir(path) ) {
index 59a7ba8c1d685d7b645bb8cff2ce77a10ce73b81..b03dd84cd57b882765526bce0297aa6f3c496320 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: desktop.c,v 1.26 2003-04-09 06:05:24 didg Exp $
+ * $Id: desktop.c,v 1.27 2003-05-03 20:03:13 didg Exp $
  *
  * See COPYRIGHT.
  *
@@ -151,7 +151,7 @@ int         ibuflen, *rbuflen;
 
     memcpy( &vid, ibuf, sizeof( vid ));
     ibuf += sizeof( vid );
-    if (( vol = getvolbyvid( vid )) == NULL ) {
+    if (NULL == ( vol = getvolbyvid( vid )) ) {
         cc = AFPERR_PARAM;
         goto addicon_err;
     }
index 9c2fdca4d86df5f779c2e481d74ddfd05266a9a4..30c21b3e81a114e691257bef87ea7ddd8c96dacd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: directory.c,v 1.71 2003-04-24 17:05:38 didg Exp $
+ * $Id: directory.c,v 1.72 2003-05-03 20:03:13 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -2135,7 +2135,7 @@ int               ibuflen, *rbuflen;
 
         case 2 :
         case 4 : /* unicode */
-            if (( gr = (struct group *)getgrgid( id )) == NULL ) {
+            if (NULL == ( gr = (struct group *)getgrgid( id ))) {
                 return( AFPERR_NOITEM );
             }
             name = gr->gr_name;
@@ -2205,7 +2205,7 @@ int               ibuflen, *rbuflen;
         switch ( sfunc ) {
         case 1 : /* unicode */
         case 3 :
-            if (( pw = (struct passwd *)getpwnam( ibuf )) == NULL ) {
+            if (NULL == ( pw = (struct passwd *)getpwnam( ibuf )) ) {
                 return( AFPERR_NOITEM );
             }
             id = pw->pw_uid;
@@ -2213,7 +2213,7 @@ int               ibuflen, *rbuflen;
 
         case 2 : /* unicode */
         case 4 :
-            if (( gr = (struct group *)getgrnam( ibuf )) == NULL ) {
+            if (NULL == ( gr = (struct group *)getgrnam( ibuf ))) {
                 return( AFPERR_NOITEM );
             }
             id = gr->gr_gid;
index d2400262db06a3ce4ea8d83e913b9bfcef1b6036..22c0d7878d1f2bb75761c319383788a93c6a375b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.45 2003-04-20 06:53:40 didg Exp $
+ * $Id: filedir.c,v 1.46 2003-05-03 20:03:13 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -718,7 +718,7 @@ int         ibuflen, *rbuflen;
     if (NULL == ( ddir = dirlookup( vol, did )) ) {
         return afp_errno; /*  was AFPERR_PARAM */
     }
-    if (( path = cname( vol, ddir, &ibuf )) == NULL ) {
+    if (NULL == ( path = cname( vol, ddir, &ibuf ))) {
         return( AFPERR_NOOBJ );
     }
     if ( *path->m_name != '\0' ) {