summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-06-16 10:37:09 +0300
committerTor Lillqvist <tml@iki.fi>2013-06-16 11:19:11 +0300
commit027d114b832686ab927c7db91ea512d2dcdc77ac (patch)
tree59be4c04f2f862965bf2180203df9de2bfc44978 /sal/osl
parente17ab68dbdc7cae8488b39407908d2d218011a2f (diff)
Indent macxp_resolveAlias() consistently
Change-Id: I66ab13c4111678f20a09f14126304a0c11116180
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/system.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index 8c8280dff70c..1e9e249ad857 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -146,58 +146,58 @@ int macxp_resolveAlias(char *path, int buflen)
char *unprocessedPath = path;
if ( *unprocessedPath == '/' )
- unprocessedPath++;
+ unprocessedPath++;
int nRet = 0;
while ( !nRet && unprocessedPath && *unprocessedPath )
- {
+ {
unprocessedPath = strchr( unprocessedPath, '/' );
if ( unprocessedPath )
- *unprocessedPath = '\0';
+ *unprocessedPath = '\0';
nErr = noErr;
bFolder = FALSE;
bAliased = FALSE;
if ( FSPathMakeRef( (const UInt8 *)path, &aFSRef, 0 ) == noErr )
- {
- nErr = FSResolveAliasFileWithMountFlags( &aFSRef, TRUE, &bFolder, &bAliased, kResolveAliasFileNoUI );
- if ( nErr == nsvErr )
- {
- errno = ENOENT;
- nRet = -1;
- }
- else if ( nErr == noErr && bAliased )
- {
- char tmpPath[ PATH_MAX ];
- if ( FSRefMakePath( &aFSRef, (UInt8 *)tmpPath, PATH_MAX ) == noErr )
- {
- int nLen = strlen( tmpPath ) + ( unprocessedPath ? strlen( unprocessedPath + 1 ) + 1 : 0 );
- if ( nLen < buflen && nLen < PATH_MAX )
- {
- if ( unprocessedPath )
- {
- int nTmpPathLen = strlen( tmpPath );
- strcat( tmpPath, "/" );
- strcat( tmpPath, unprocessedPath + 1 );
- strcpy( path, tmpPath);
- unprocessedPath = path + nTmpPathLen;
- }
- else if ( !unprocessedPath )
- {
- strcpy( path, tmpPath);
- }
- }
- else
- {
- errno = ENAMETOOLONG;
+ {
+ nErr = FSResolveAliasFileWithMountFlags( &aFSRef, TRUE, &bFolder, &bAliased, kResolveAliasFileNoUI );
+ if ( nErr == nsvErr )
+ {
+ errno = ENOENT;
nRet = -1;
- }
- }
- }
- }
+ }
+ else if ( nErr == noErr && bAliased )
+ {
+ char tmpPath[ PATH_MAX ];
+ if ( FSRefMakePath( &aFSRef, (UInt8 *)tmpPath, PATH_MAX ) == noErr )
+ {
+ int nLen = strlen( tmpPath ) + ( unprocessedPath ? strlen( unprocessedPath + 1 ) + 1 : 0 );
+ if ( nLen < buflen && nLen < PATH_MAX )
+ {
+ if ( unprocessedPath )
+ {
+ int nTmpPathLen = strlen( tmpPath );
+ strcat( tmpPath, "/" );
+ strcat( tmpPath, unprocessedPath + 1 );
+ strcpy( path, tmpPath);
+ unprocessedPath = path + nTmpPathLen;
+ }
+ else if ( !unprocessedPath )
+ {
+ strcpy( path, tmpPath);
+ }
+ }
+ else
+ {
+ errno = ENAMETOOLONG;
+ nRet = -1;
+ }
+ }
+ }
+ }
if ( unprocessedPath )
- *unprocessedPath++ = '/';
+ *unprocessedPath++ = '/';
}
return nRet;