From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 7 16:28:58 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5188106566C; Thu, 7 Aug 2008 16:28:58 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 77CF88FC08; Thu, 7 Aug 2008 16:28:58 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 5A91414D6850; Thu, 7 Aug 2008 18:28:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1yO4FUJNrVcG; Thu, 7 Aug 2008 18:28:55 +0200 (CEST) Received: from [192.168.1.146] (catv-50629c59.catv.broadband.hu [80.98.156.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 9540514D684E; Thu, 7 Aug 2008 18:28:53 +0200 (CEST) Message-ID: <489B22BD.5050109@kovesdan.org> Date: Thu, 07 Aug 2008 18:28:45 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: "Sean C. Farley" References: <489B0ACD.80008@kovesdan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 07 Aug 2008 17:04:03 +0000 Cc: fjoe@FreeBSD.org, hackers@FreeBSD.org Subject: Re: strange issue reading /dev/null X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 16:28:58 -0000 Sean C. Farley ha scritto: > You are testing c which has not been set. It works OK if you set c then > do the test: > > + c = fgetc(f); > if (c != EOF) > - printf("%c\n", fgetc(f)); > + printf("%c\n", c); Yes, you are right, this is what I meant, I'm just a bit disorganised.... Thanks! Gábor