From owner-freebsd-current Thu Sep 21 05:50:28 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id FAA04995 for current-outgoing; Thu, 21 Sep 1995 05:50:28 -0700 Received: from mail.cs.tu-berlin.de (root@mail.cs.tu-berlin.de [130.149.17.13]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id FAA04974 for ; Thu, 21 Sep 1995 05:49:32 -0700 Received: from caramba.cs.tu-berlin.de (wosch@caramba.cs.tu-berlin.de [130.149.144.4]) by mail.cs.tu-berlin.de (8.6.12/8.6.12) with ESMTP id OAA21829 for ; Thu, 21 Sep 1995 14:46:51 +0200 From: Wolfram Schneider Received: (wosch@localhost) by caramba.cs.tu-berlin.de (8.6.12/8.6.9) id OAA03990; Thu, 21 Sep 1995 14:46:47 +0200 Date: Thu, 21 Sep 1995 14:46:47 +0200 Message-Id: <199509211246.OAA03990@caramba.cs.tu-berlin.de> To: current@FreeBSD.org Subject: from(1) In-Reply-To: <199509201737.TAA03936@caramba.cs.tu-berlin.de> References: <199509201737.TAA03936@caramba.cs.tu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-current@FreeBSD.org Precedence: bulk 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