|
From: <cre...@us...> - 2006-09-08 17:57:32
|
Revision: 1494
http://svn.sourceforge.net/frontierkernel/?rev=1494&view=rev
Author: creecode
Date: 2006-09-08 10:57:29 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
minor code tweaks, no functional change
some functions were returning OSErr but were being assigned to type OSStatus, fixed
Modified Paths:
--------------
Frontier/branches/FSRef_Migration/Common/source/fileops.c
Modified: Frontier/branches/FSRef_Migration/Common/source/fileops.c
===================================================================
--- Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-09-08 17:54:49 UTC (rev 1493)
+++ Frontier/branches/FSRef_Migration/Common/source/fileops.c 2006-09-08 17:57:29 UTC (rev 1494)
@@ -1316,11 +1316,11 @@
return ( false );
FSCatalogInfo catalogInfo;
- OSStatus status;
+ OSErr err;
clearbytes ( &catalogInfo, longsizeof ( catalogInfo ) );
- status = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoParentDirID, &catalogInfo, NULL, NULL, NULL );
+ err = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoGettableInfo, &catalogInfo, NULL, NULL, NULL ); // kFSCatInfoParentDirID
return ( catalogInfo.parentDirID == fsRtParID );
@@ -2012,7 +2012,7 @@
err = FSFindFolder ( vnum, foldertype, flcreate, &( *fs ).fsref );
- getfilespecparent ( fs );
+ ( void ) getfilespecparent ( fs );
}
@@ -3024,18 +3024,16 @@
// this function used to use oserror but I don't think oserror can handle osstatus properly
HFSUniStr255 name;
- OSStatus status;
+ OSErr err = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fsparent ).fsref );
- status = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fsparent ).fsref );
-
- if ( status != noErr )
+ if ( err != noErr )
return ( false );
if ( ( *fs ).path == NULL ) {
- status = FSGetCatalogInfo ( &( *fsparent ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fsparent ).fsref );
+ err = FSGetCatalogInfo ( &( *fsparent ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fsparent ).fsref );
- if ( status != noErr )
+ if ( err != noErr )
return ( false );
}
@@ -3662,11 +3660,9 @@
#ifdef MACVERSION
HFSUniStr255 name;
- OSStatus status;
+ OSErr err = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fs ).fsref );
- status = FSGetCatalogInfo ( &( *fs ).fsref, kFSCatInfoNone, NULL, &name, NULL, &( *fs ).fsref );
-
- if ( status != noErr )
+ if ( err != noErr )
return ( false );
( *fs ).path = CFStringCreateWithCharacters ( kCFAllocatorDefault, name.unicode, name.length );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|