some fixes

Sun, 17 Mar 2013 19:19:57 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 17 Mar 2013 19:19:57 +0100
changeset 57
b3a89736b23e
parent 56
c6cf20b09043
child 58
66c22e54aa90

some fixes

src/server/daemon/vfs.c file | annotate | diff | comparison | revisions
src/server/safs/service.c file | annotate | diff | comparison | revisions
--- a/src/server/daemon/vfs.c	Sun Mar 17 17:54:20 2013 +0100
+++ b/src/server/daemon/vfs.c	Sun Mar 17 19:19:57 2013 +0100
@@ -160,7 +160,7 @@
     uid_t uid; // uid and gid will be initialized by sys_acl_check
     gid_t gid;
     if(sys_acl_check(ctx, access_mask, &uid, &gid)) {
-        return NULL;
+        return -1;
     }
     
     // stat
@@ -340,7 +340,7 @@
     uid_t uid; // uid and gid will be initialized by sys_acl_check
     gid_t gid;
     if(sys_acl_check(ctx, access_mask, &uid, &gid)) {
-        return NULL;
+        return -1;
     }
     
     // do path operation
--- a/src/server/safs/service.c	Sun Mar 17 17:54:20 2013 +0100
+++ b/src/server/safs/service.c	Sun Mar 17 19:19:57 2013 +0100
@@ -139,7 +139,7 @@
 
     //struct dirent *f;
     VFS_ENTRY f;
-    while((vfs_readdir(dir, &f)) != NULL) {
+    while(vfs_readdir(dir, &f)) {
         if(strcmp(f.name, ".") == 0 || strcmp(f.name, "..") == 0) {
             continue;
         }

mercurial