httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bh...@gensym.com (Ben Hyde)
Subject [PATCH] Rename misleading argument name in doerror of buff.c
Date Thu, 22 Jan 1998 15:11:41 GMT
The second argument to doerror within buff.c is not an err, but rather the
direction the I/O what trying to proceeding in.  Rename it to direction so
others don't suffer.  Meanwhile rearrange some code - it's what I do.

---
> cvs diff -u buff.c
Index: buff.c
===================================================================
RCS file: /cvs/apachen/src/main/buff.c,v
retrieving revision 1.57
diff -u -r1.57 buff.c
--- buff.c	1998/01/16 14:22:54	1.57
+++ buff.c	1998/01/22 20:09:11
@@ -247,16 +247,13 @@
     return rv;
 }
 
-static void doerror(BUFF *fb, int err)
+static void doerror(BUFF *fb, int direction)
 {
     int errsave = errno;	/* Save errno to prevent overwriting it below */
 
-    if (err == B_RD)
-	fb->flags |= B_RDERR;
-    else
-	fb->flags |= B_WRERR;
+    fb->flags |= (direction == B_RD ? B_RDERR : B_WRERR);
     if (fb->error != NULL)
-	(*fb->error) (fb, err, fb->error_data);
+	(*fb->error) (fb, direction, fb->error_data);
 
     errno = errsave;
 }

Mime
View raw message