cvs commit: ALFS/nALFS/src backend.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Sat Apr 3 16:41:33 PST 2004


kpfleming    04/04/03 17:41:33

  Modified:    nALFS/src backend.c
  Log:
  fix child input buffer handling
  
  Revision  Changes    Path
  1.23      +4 -3      ALFS/nALFS/src/backend.c
  
  Index: backend.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/backend.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- backend.c	4 Apr 2004 00:29:52 -0000	1.22
  +++ backend.c	4 Apr 2004 00:41:33 -0000	1.23
  @@ -229,11 +229,12 @@
   	child->used += input;
   	child->buf[child->used] = '\0';
   	while ((line_end = strchr(&child->buf[0], '\n')) != NULL) {
  -		size_t line_length = (line_end - &child->buf[0]) + 1;
  +		size_t line_length = (line_end - &child->buf[0]);
   
   		send_child_output(child, line_length);
  -		memmove(&child->buf[0], ++line_end, child->used - line_length);
  -		child->used -= line_length;
  +		memmove(&child->buf[0], ++line_end,
  +			child->used - (line_length + 1));
  +		child->used -= (line_length + 1);
   	}
   }
   
  
  
  



More information about the alfs-log mailing list