Date: Thu, 21 Sep 1995 14:46:47 +0200 From: Wolfram Schneider <wosch@cs.tu-berlin.de> To: current@FreeBSD.org Subject: from(1) Message-ID: <199509211246.OAA03990@caramba.cs.tu-berlin.de> In-Reply-To: <199509201737.TAA03936@caramba.cs.tu-berlin.de> References: <199509201737.TAA03936@caramba.cs.tu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Wolfram Schneider writes: >+ /* skip bytes in body (content-length) */ >+ if (header && body > 0) { >+ while(body--) >+ getc(stdin); >+ } Should be: while(body--) if (getc(stdin) == EOF) break; or more elegant: while(body-- && getc(stdin) != EOF); Wolfram -- Wolfram Schneider <wosch@cs.tu-berlin.de> <a href="http://hyperg.cs.tu-berlin.de/C~wosch">wosch</a>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509211246.OAA03990>