You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Hyde <bh...@gensym.com> on 1998/01/22 21:11:41 UTC

[PATCH] Rename misleading argument name in doerror of buff.c

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;
 }