[Opensrf-commits] r1996 - trunk/src/srfsh (scottmk)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 13 12:16:28 EDT 2010


Author: scottmk
Date: 2010-08-13 12:16:25 -0400 (Fri, 13 Aug 2010)
New Revision: 1996

Modified:
   trunk/src/srfsh/srfsh.c
Log:
Minor cleanup:

Changed two calls to buffer_add(), when appending a single character,
to call buffer_add_char() instead, which is slightly more efficient.

M    src/srfsh/srfsh.c


Modified: trunk/src/srfsh/srfsh.c
===================================================================
--- trunk/src/srfsh/srfsh.c	2010-08-13 16:16:05 UTC (rev 1995)
+++ trunk/src/srfsh/srfsh.c	2010-08-13 16:16:25 UTC (rev 1996)
@@ -449,7 +449,7 @@
 		if(type) buffer_fadd( argbuf, ", \"type\" : \"%s\"", type );
 		if(orgloci) buffer_fadd( argbuf, ", \"org\" : %d", orgloci );
 		if(workstation) buffer_fadd( argbuf, ", \"workstation\" : \"%s\"", workstation);
-		buffer_add(argbuf, "}");
+		buffer_add_char( argbuf, '}' );
 
 		free(pass_buf);
 		free(mess_buf);
@@ -712,7 +712,7 @@
 		if( !relay ) {
 			int first = 1;   // boolean
 			buffer = buffer_init( 128 );
-			buffer_add( buffer, "[" );
+			buffer_add_char( buffer, '[' );
 			for(i = 3; ; i++ ) {
 				const char* word = osrfStringArrayGetString( cmd_array, i );
 				if( !word )



More information about the opensrf-commits mailing list