From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18793 invoked from network); 3 Mar 2009 16:55:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Mar 2009 16:55:24 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 48606 invoked from network); 3 Mar 2009 16:55:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Mar 2009 16:55:21 -0000 Received: (qmail 26015 invoked by alias); 3 Mar 2009 16:55:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26673 Received: (qmail 25998 invoked from network); 3 Mar 2009 16:55:17 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 3 Mar 2009 16:55:17 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 548EF8058F82 for ; Tue, 3 Mar 2009 17:55:13 +0100 (CET) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly22g.srv.mailcontrol.com (MailControl) with ESMTP id n23GtAk4026098 for ; Tue, 3 Mar 2009 16:55:11 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 Mar 2009 16:55:09 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n23Gt9Mp023751 for ; Tue, 3 Mar 2009 16:55:10 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n23Gt97v023747 for ; Tue, 3 Mar 2009 16:55:09 GMT Message-Id: <200903031655.n23Gt97v023747@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh workers Subject: Re: [wip patch] new zsh/attr module In-reply-to: <237967ef0903030851gc26620ficfc908628a4b3be2@mail.gmail.com> References: <20090303121253.61f5e2ec@news01> <20090303163526.533995be@news01> <237967ef0903030851gc26620ficfc908628a4b3be2@mail.gmail.com> Comments: In-reply-to Mikael Magnusson message dated "Tue, 03 Mar 2009 17:51:09 +0100." Date: Tue, 03 Mar 2009 16:55:08 +0000 From: Peter Stephenson X-OriginalArrivalTime: 03 Mar 2009 16:55:09.0616 (UTC) FILETIME=[CFCFD300:01C99C20] X-Scanned-By: MailControl A_08_51_00 (www.mailcontrol.com) on 10.71.0.132 X-Virus-Scanned: ClamAV 0.92.1/9065/Tue Mar 3 11:43:41 2009 on bifrost X-Virus-Status: Clean Mikael Magnusson wrote: > > don't report errors unless system calls returned a negative value > > I know the codestyle is a bit questionable but I already check 0 < len > in the first if, so the else will be all negative lengths already. ... or zero, which was the problem. It was printing an error message with errno 0 if the list returned empty. It now does the standard Unix-style thing of printing nothing but returning status zero. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070