[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Tiny tweak for error checking in fs.c

From: Bill Tutt <billtut_at_microsoft.com>
Date: 2001-05-10 18:41:02 CEST

While running repos_test for a 2nd time, the repository creation failed
because the status check against APR_ENOENT didn't match what the APR
code returned.

It appears that APR wants folks to use the APR_STATUS_IS_E....() macros
in order to perform this check. The Win32 definition of the macro also
has a bug, it's missing the very error code that is returned from
apr_dir_read() here.

Ok to commit?

Thanks,
Bill

* subversion/libsvn_fs/fs.c: (svn_fs_delete_berkeley) Use
APR_STATUS_IS_ENOENT instead of direct comparison.

Index: fs.c
===================================================================
RCS file:
/usr/local/tigris/data/helm/cvs/repository/subversion/subversion/libsvn_
fs/fs.c,v
retrieving revision 1.42
diff -u -r1.42 fs.c
--- fs.c 2001/05/09 19:26:40 1.42
+++ fs.c 2001/05/10 16:34:20
@@ -465,7 +465,7 @@
         apr_finfo_t finfo;
 
         status = apr_dir_read (&finfo, APR_FINFO_NAME, dir);
- if (status == APR_ENOENT)
+ if (APR_STATUS_IS_ENOENT(status))
           break;
         SVN_ERR (check_apr (status, pool

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.