You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2002/12/08 21:51:43 UTC
cvs commit: apache-1.3/src/main alloc.c
jim 2002/12/08 12:51:43
Modified: src/main alloc.c
Log:
Simplify back to true flag usage of domagic; good catch by Justin.
Revision Changes Path
1.132 +7 -23 apache-1.3/src/main/alloc.c
Index: alloc.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/alloc.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- alloc.c 8 Dec 2002 19:09:55 -0000 1.131
+++ alloc.c 8 Dec 2002 20:51:43 -0000 1.132
@@ -1813,15 +1813,8 @@
API_EXPORT(void) ap_note_cleanups_for_fd_ex(pool *p, int fd, int domagic)
{
- if (domagic) {
- ap_register_cleanup_ex(p, (void *) (long) fd, fd_cleanup, fd_cleanup,
- fd_magic_cleanup);
- } else {
- /* basically ap_register_cleanup but save the possible
- overhead of an extraneous function call */
- ap_register_cleanup_ex(p, (void *) (long) fd, fd_cleanup, fd_cleanup,
- NULL);
- }
+ ap_register_cleanup_ex(p, (void *) (long) fd, fd_cleanup, fd_cleanup,
+ domagic ? fd_magic_cleanup : NULL);
}
API_EXPORT(void) ap_note_cleanups_for_fd(pool *p, int fd)
@@ -1915,13 +1908,8 @@
API_EXPORT(void) ap_note_cleanups_for_file_ex(pool *p, FILE *fp, int domagic)
{
- if (domagic) {
- ap_register_cleanup_ex(p, (void *) fp, file_cleanup, file_child_cleanup,
- file_magic_cleanup);
- } else {
- ap_register_cleanup_ex(p, (void *) fp, file_cleanup, file_child_cleanup,
- NULL);
- }
+ ap_register_cleanup_ex(p, (void *) fp, file_cleanup, file_child_cleanup,
+ domagic ? file_magic_cleanup : NULL);
}
API_EXPORT(void) ap_note_cleanups_for_file(pool *p, FILE *fp)
@@ -2044,13 +2032,9 @@
API_EXPORT(void) ap_note_cleanups_for_socket_ex(pool *p, int fd, int domagic)
{
- if (domagic) {
- ap_register_cleanup_ex(p, (void *) (long) fd, socket_cleanup,
- socket_cleanup, socket_magic_cleanup);
- } else {
- ap_register_cleanup_ex(p, (void *) (long) fd, socket_cleanup,
- socket_cleanup, NULL);
- }
+ ap_register_cleanup_ex(p, (void *) (long) fd, socket_cleanup,
+ socket_cleanup,
+ domagic ? socket_magic_cleanup : NULL);
}
API_EXPORT(void) ap_note_cleanups_for_socket(pool *p, int fd)