[comp.os.minix] fix for bug in amoeba/examples/client3.c

bob@dhw68k.cts.com (Bob Best) (11/12/88)

The file amoeba/examples/client3.c contains a serious bug that involves
improper placement of parentheses around a read() system call.
The following patch fixes the problem.

I compiled the amoeba network code using the -DNONET option.  All the
example programs ran without problem.  I'd really like to test this
code using a couple WD8003E boards.  Do you think Western Digital would
offer discounts if a large group of Minix users were willing to make
purchases?  Is there a dealer out there who would be willing to offer
discounts to a group of Minix users?

Bob
----------patch for amoeba/examples/client3.c----------
Index: client3.c
*** client3.c~	Fri Nov 11 17:26:39 1988
--- client3.c	Fri Nov 11 17:27:20 1988
***************
*** 225,231 ****
    }
  
    do {
! 	if ((n=read(fd1, b, 1024) < 0)) {
  		printf("Cannot read %s\n", argv[1]);
  		exit(1);
  	}
--- 225,231 ----
    }
  
    do {
! 	if ((n=read(fd1, b, 1024)) < 0) {
  		printf("Cannot read %s\n", argv[1]);
  		exit(1);
  	}
-- 
Bob Best
uucp: {spsd, zardoz, felix}!dhw68k!bob	InterNet: bob@dhw68k.cts.com