Author: rooneg
Date: Wed Mar  9 18:54:57 2005
New Revision: 156730

URL: http://svn.apache.org/viewcvs?view=rev&rev=156730
Log:
When looking for a specific kind of APR error use the APR_STATUS_IS
macros, not a direct comparison.

* src/index/index.c
  (lcn_doc_iter_next, lcn_index_term_docs): use APR_STATUS_IS_ENOENT
   instead of looking for APR_ENOENT directly.

* src/store/directory.c
  (fs_file_exists_internal): ditto.

Modified:
    incubator/lucene4c/trunk/src/index/index.c
    incubator/lucene4c/trunk/src/store/directory.c

Modified: incubator/lucene4c/trunk/src/index/index.c
URL: 
http://svn.apache.org/viewcvs/incubator/lucene4c/trunk/src/index/index.c?view=diff&r1=156729&r2=156730
==============================================================================
--- incubator/lucene4c/trunk/src/index/index.c (original)
+++ incubator/lucene4c/trunk/src/index/index.c Wed Mar  9 18:54:57 2005
@@ -105,7 +105,7 @@
                                         itr->cur_seg,
                                         itr->term,
                                         itr->temppool);
-          if (err && err->apr_err == APR_ENOENT)
+          if (err && APR_STATUS_IS_ENOENT (err->apr_err))
             lcn_error_clear (err);
           else if (err)
             return err;
@@ -162,7 +162,7 @@
                                     itr->term,
                                     itr->temppool);
 
-      if (err && err->apr_err == APR_ENOENT)
+      if (err && APR_STATUS_IS_ENOENT (err->apr_err))
         lcn_error_clear (err);
       else if (err)
         return err;

Modified: incubator/lucene4c/trunk/src/store/directory.c
URL: 
http://svn.apache.org/viewcvs/incubator/lucene4c/trunk/src/store/directory.c?view=diff&r1=156729&r2=156730
==============================================================================
--- incubator/lucene4c/trunk/src/store/directory.c (original)
+++ incubator/lucene4c/trunk/src/store/directory.c Wed Mar  9 18:54:57 2005
@@ -327,7 +327,7 @@
     {
       *result = FALSE;
 
-      if (apr_err != APR_ENOENT)
+      if (! APR_STATUS_IS_ENOENT (apr_err))
         return lcn_error_createf (apr_err,
                                   NULL,
                                   "error stating file '%s'",


Reply via email to