jerenkrantz 2004/07/31 15:36:03
Modified: . CHANGES
file_io/netware filestat.c
file_io/unix filestat.c
include apr_errno.h
test testsockopt.c
Log:
Eliminate APR_STATUS_IS_SUCCESS macro.
Reviewed by (conceptually): Ryan, Greg, Fitz
Revision Changes Path
1.485 +2 -0 apr/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr/CHANGES,v
retrieving revision 1.484
retrieving revision 1.485
diff -u -u -r1.484 -r1.485
--- CHANGES 22 Jul 2004 01:48:34 -0000 1.484
+++ CHANGES 31 Jul 2004 22:36:03 -0000 1.485
@@ -12,6 +12,8 @@
Changes with APR 1.0
+ *) Remove APR_STATUS_IS_SUCCESS() macro. [Justin Erenkrantz]
+
*) apr_proc_create() on Unix: Remove unnecessary check for read
access to the working directory of the child process.
PR 30137. [Jeremy Chadwick <apache jdc.parodius.com>]
1.35 +2 -2 apr/file_io/netware/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/netware/filestat.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -u -r1.34 -r1.35
--- filestat.c 29 Mar 2004 17:53:28 -0000 1.34
+++ filestat.c 31 Jul 2004 22:36:03 -0000 1.35
@@ -123,7 +123,7 @@
return APR_SUCCESS;
status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
- if (!APR_STATUS_IS_SUCCESS(status))
+ if (status)
return status;
/* ### TODO: should added bits be umask'd? */
@@ -352,7 +352,7 @@
apr_finfo_t finfo;
status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
- if (!APR_STATUS_IS_SUCCESS(status)) {
+ if (status) {
return status;
}
1.73 +2 -2 apr/file_io/unix/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/filestat.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -u -r1.72 -r1.73
--- filestat.c 27 Mar 2004 13:11:17 -0000 1.72
+++ filestat.c 31 Jul 2004 22:36:03 -0000 1.73
@@ -137,7 +137,7 @@
return APR_SUCCESS;
status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
- if (!APR_STATUS_IS_SUCCESS(status))
+ if (status)
return status;
/* ### TODO: should added bits be umask'd? */
@@ -187,7 +187,7 @@
apr_finfo_t finfo;
status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
- if (!APR_STATUS_IS_SUCCESS(status)) {
+ if (status) {
return status;
}
1.121 +1 -11 apr/include/apr_errno.h
Index: apr_errno.h
===================================================================
RCS file: /home/cvs/apr/include/apr_errno.h,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -u -r1.120 -r1.121
--- apr_errno.h 9 Apr 2004 02:03:48 -0000 1.120
+++ apr_errno.h 31 Jul 2004 22:36:03 -0000 1.121
@@ -154,7 +154,7 @@
*/
#define APR_OS_START_SYSERR (APR_OS_START_EAIERR + APR_OS_ERRSPACE_SIZE)
-/** no error. @see APR_STATUS_IS_SUCCESS */
+/** no error. */
#define APR_SUCCESS 0
/**
@@ -787,9 +787,6 @@
*/
#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
-#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \
- || (s) == APR_OS_START_SYSERR + NO_ERROR)
-
/* These can't sit in a private header, so in spite of the extra size,
* they need to be made available here.
*/
@@ -948,9 +945,6 @@
#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError()))
#define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e)))
-#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS \
- || (s) == APR_OS_START_SYSERR + ERROR_SUCCESS)
-
/* APR CANONICAL ERROR TESTS */
#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES \
|| (s) == APR_OS_START_SYSERR + ERROR_ACCESS_DENIED \
@@ -1063,8 +1057,6 @@
#define apr_get_netos_error() (APR_FROM_OS_ERROR(WSAGetLastError()))
#define apr_set_netos_error(e) (WSASetLastError(APR_TO_OS_ERROR(e)))
-#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS)
-
/* APR CANONICAL ERROR TESTS */
#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES)
#define APR_STATUS_IS_EEXIST(s) ((s) == APR_EEXIST)
@@ -1132,8 +1124,6 @@
* @addtogroup APR_STATUS_IS
* @{
*/
-/** no error */
-#define APR_STATUS_IS_SUCCESS(s) ((s) == APR_SUCCESS)
/** permission denied */
#define APR_STATUS_IS_EACCES(s) ((s) == APR_EACCES)
1.22 +1 -1 apr/test/testsockopt.c
Index: testsockopt.c
===================================================================
RCS file: /home/cvs/apr/test/testsockopt.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -u -r1.21 -r1.22
--- testsockopt.c 7 Jun 2004 21:21:35 -0000 1.21
+++ testsockopt.c 31 Jul 2004 22:36:03 -0000 1.22
@@ -53,7 +53,7 @@
rv1 = apr_socket_opt_set(sock, APR_SO_DEBUG, 1);
rv2 = apr_socket_opt_get(sock, APR_SO_DEBUG, &ck);
APR_ASSERT_SUCCESS(tc, "get SO_DEBUG option", rv2);
- if (APR_STATUS_IS_SUCCESS(rv1)) {
+ if (rv1 == APR_SUCCESS) {
ABTS_INT_EQUAL(tc, 1, ck);
} else {
ABTS_INT_EQUAL(tc, 0, ck);