apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r356578 - in /apr/apr/trunk/test: sendfile.c testfileinfo.c
Date Tue, 13 Dec 2005 19:21:37 GMT
Author: rooneg
Date: Tue Dec 13 11:21:28 2005
New Revision: 356578

URL: http://svn.apache.org/viewcvs?rev=356578&view=rev
Log:
Use APR_STATUS_IS_INCOMPLETE instead of comparing directly against
APR_INCOMPLETE in a few test programs.

* test/testfileinfo.c
  (test_info_get,
   test_stat,
   test_mtime_set): Use APR_STATUS_IS_INCOMPLETE.

* test/sendfile.c
  (create_testfile): Use APR_STATUS_IS_INCOMPLETE.

Modified:
    apr/apr/trunk/test/sendfile.c
    apr/apr/trunk/test/testfileinfo.c

Modified: apr/apr/trunk/test/sendfile.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/sendfile.c?rev=356578&r1=356577&r2=356578&view=diff
==============================================================================
--- apr/apr/trunk/test/sendfile.c (original)
+++ apr/apr/trunk/test/sendfile.c Tue Dec 13 11:21:28 2005
@@ -147,7 +147,7 @@
     }
 
     rv = apr_stat(&finfo, fname, APR_FINFO_NORM, p);
-    if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
+    if (rv != APR_SUCCESS && ! APR_STATUS_IS_INCOMPLETE(rv)) {
         fprintf(stderr, "apr_stat()->%d/%s\n",
                 rv, apr_strerror(rv, buf, sizeof buf));
         exit(1);

Modified: apr/apr/trunk/test/testfileinfo.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/test/testfileinfo.c?rev=356578&r1=356577&r2=356578&view=diff
==============================================================================
--- apr/apr/trunk/test/testfileinfo.c (original)
+++ apr/apr/trunk/test/testfileinfo.c Tue Dec 13 11:21:28 2005
@@ -113,7 +113,7 @@
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
-    if (rv  == APR_INCOMPLETE) {
+    if (APR_STATUS_IS_INCOMPLETE(rv)) {
         char *str;
 	int i;
         str = apr_pstrdup(p, "APR_INCOMPLETE:  Missing ");
@@ -134,7 +134,7 @@
     apr_status_t rv;
 
     rv = apr_stat(&finfo, FILENAME, APR_FINFO_NORM, p);
-    if (rv  == APR_INCOMPLETE) {
+    if (APR_STATUS_IS_INCOMPLETE(rv)) {
         char *str;
 	int i;
         str = apr_pstrdup(p, "APR_INCOMPLETE:  Missing ");
@@ -220,7 +220,7 @@
 
     /* Check that the current mtime is not the epoch */
     rv = apr_stat(&finfo, NEWFILENAME, APR_FINFO_MTIME, p);
-    if (rv  == APR_INCOMPLETE) {
+    if (APR_STATUS_IS_INCOMPLETE(rv)) {
         char *str;
 	int i;
         str = apr_pstrdup(p, "APR_INCOMPLETE:  Missing ");



Mime
View raw message