/*
- * $Id: directory.c,v 1.56 2003-01-12 14:39:58 didg Exp $
+ * $Id: directory.c,v 1.57 2003-01-21 09:58:58 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
memcpy( &did, ibuf, sizeof( did ));
ibuf += sizeof( int );
- if (( dir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( dir = dirlookup( vol, did )) ) {
return afp_errno;
}
bitmap = ntohs( bitmap );
ibuf += sizeof( bitmap );
- if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
return afp_errno;
}
ibuf++;
}
- if (( rc = setdirparams(vol, path, bitmap, ibuf )) == AFP_OK ) {
+ if (AFP_OK == ( rc = setdirparams(vol, path, bitmap, ibuf )) ) {
setvoltime(obj, vol );
}
return( rc );
/*
- * $Id: file.c,v 1.74 2003-01-16 21:18:15 didg Exp $
+ * $Id: file.c,v 1.75 2003-01-21 09:58:58 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
memcpy(&did, ibuf, sizeof( did ));
ibuf += sizeof( did );
- if (( dir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( dir = dirlookup( vol, did )) ) {
return( AFPERR_NOOBJ );
}
bitmap = ntohs( bitmap );
ibuf += sizeof( bitmap );
- if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( s_path = cname( vol, dir, &ibuf )) ) {
return afp_errno;
}
ibuf++;
}
- if (( rc = setfilparams(vol, s_path, bitmap, ibuf )) == AFP_OK ) {
+ if (AFP_OK == ( rc = setfilparams(vol, s_path, bitmap, ibuf )) ) {
setvoltime(obj, vol );
}
memcpy(&did, ibuf, sizeof( did ));
ibuf += sizeof(did);
- if (( dir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( dir = dirlookup( vol, did )) ) {
return( AFPERR_PARAM );
}
memcpy(&vid, ibuf, sizeof(vid));
ibuf += sizeof(vid);
- if (( vol = getvolbyvid( vid )) == NULL ) {
+ if (NULL == ( vol = getvolbyvid( vid )) ) {
return( AFPERR_PARAM);
}
memcpy(&id, ibuf, sizeof( id ));
ibuf += sizeof(id);
- if ((upath = cnid_resolve(vol->v_db, &id, buffer, len)) == NULL) {
+ if (NULL == (upath = cnid_resolve(vol->v_db, &id, buffer, len)) ) {
return AFPERR_NOID; /* was AFPERR_BADID, but help older Macs */
}
memcpy(&vid, ibuf, sizeof(vid));
ibuf += sizeof(vid);
- if (( vol = getvolbyvid( vid )) == NULL ) {
+ if (NULL == ( vol = getvolbyvid( vid )) ) {
return( AFPERR_PARAM);
}
ibuf += sizeof(id);
fileid = id;
- if ((upath = cnid_resolve(vol->v_db, &id, buffer, len)) == NULL) {
+ if (NULL == (upath = cnid_resolve(vol->v_db, &id, buffer, len)) ) {
return AFPERR_NOID;
}
ibuf += sizeof(did);
/* source file */
- if ((dir = dirlookup( vol, sid )) == NULL ) {
+ if (NULL == (dir = dirlookup( vol, sid )) ) {
return( AFPERR_PARAM );
}
- if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
return( AFPERR_PARAM );
}
slen = strlen(supath));
#endif /* CNID_DB */
- if (( dir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( dir = dirlookup( vol, did )) ) {
return( AFPERR_PARAM );
}
- if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
return( AFPERR_PARAM );
}
/*
- * $Id: filedir.c,v 1.38 2003-01-12 14:40:01 didg Exp $
+ * $Id: filedir.c,v 1.39 2003-01-21 09:58:58 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return afp_errno;
}
- if (( s_path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( s_path = cname( vol, dir, &ibuf )) ) {
return afp_errno;
}
ibuf += sizeof( int );
/* source pathname */
- if (( path = cname( vol, sdir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, sdir, &ibuf )) ) {
return( AFPERR_NOOBJ );
}
}
/* get the destination directory */
- if (( ddir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( ddir = dirlookup( vol, did )) ) {
return( AFPERR_PARAM );
}
if (( path = cname( vol, ddir, &ibuf )) == NULL ) {