From 526ca545ef879e2923440978cb6bfb2c049f8b83 Mon Sep 17 00:00:00 2001 From: scottmk Date: Sat, 14 Aug 2010 20:48:08 +0000 Subject: [PATCH] Minor performance tweak: replace a call to buffer_add() with a call to buffer_add_n(). In this case we already know how many characters to add, so we can avoid a call to strlen(). M src/libopensrf/osrf_prefork.c git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2002 9efc2488-bf62-4759-914b-345cdb29e865 --- src/libopensrf/osrf_prefork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensrf/osrf_prefork.c b/src/libopensrf/osrf_prefork.c index 6531c2d..92e8288 100644 --- a/src/libopensrf/osrf_prefork.c +++ b/src/libopensrf/osrf_prefork.c @@ -966,7 +966,7 @@ static void prefork_child_wait( prefork_child* child ) { set_fl( child->read_data_fd, O_NONBLOCK ); gotdata = 1; } - buffer_add( gbuf, buf ); + buffer_add_n( gbuf, buf, n ); } if( errno == EAGAIN ) -- 2.11.0