[vhffs-dev] [937] I need more coffee

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 937
Author:   gradator
Date:     2007-09-21 13:08:57 +0000 (Fri, 21 Sep 2007)

Log Message:
-----------
I need more coffee

Modified Paths:
--------------
    trunk/vhffs-fs/vhffsfs.c


Modified: trunk/vhffs-fs/vhffsfs.c
===================================================================
--- trunk/vhffs-fs/vhffsfs.c	2007-09-21 12:56:52 UTC (rev 936)
+++ trunk/vhffs-fs/vhffsfs.c	2007-09-21 13:08:57 UTC (rev 937)
@@ -1022,6 +1022,7 @@
 int vhffsfs_checkquota_gid_with_realpath(char *realpath, int gid)  {
 	int mode = 0;  /* 0 = do nothing, 1 = data, 2 = repository */
 	struct dqblk *dq = NULL;
+	int ret = 0;
 
 	if(!realpath) return -EINVAL;
 	if(!vhffsfs.dataprefixpath) return 0;
@@ -1073,13 +1074,12 @@
 
 	if(!dq) {
 		printf("vhffsfs: quota: %s\n", strerror(errno));
-		return 0;
 	}
-	else if(dq->dqb_curspace > dq->dqb_bhardlimit  ||  dq->dqb_curinodes > dq->dqb_ihardlimit)  {
+	else { 
+		if(dq->dqb_curspace > dq->dqb_bhardlimit  ||  dq->dqb_curinodes > dq->dqb_ihardlimit) ret = 1;
 		free(dq);
-		return 1;
 	}
-	return 0;
+	return ret;
 }
 #endif
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/