Changeset 5046:6f882783a0eb in roaraudio


Ignore:
Timestamp:
05/30/11 13:29:07 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test for NULL not 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r4986 r5046  
    879879#if defined(ROAR_HAVE_IO_POSIX) && defined(ROAR_HAVE_UNIX) 
    880880  if ( *addr == '/' ) { 
    881    if ( grp || pwd ) { 
    882      if ( chown(addr, pwd ? pwd->pw_uid : -1, grp ? grp->gr_gid : -1) == -1 ) 
     881   if ( grp != NULL || pwd != NULL ) { 
     882     if ( chown(addr, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid : -1) == -1 ) 
    883883      return -1; 
    884884   } 
    885885#ifdef ROAR_HAVE_GETUID 
    886    if ( grp ) { 
     886   if ( grp != NULL ) { 
    887887    if ( getuid() == 0 ) 
    888888     if ( chmod(addr, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) == -1 ) 
Note: See TracChangeset for help on using the changeset viewer.