From patchwork Thu May 1 20:01:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 344801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 327D91400A6 for ; Fri, 2 May 2014 06:01:43 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=nwryPYCtD6Wie6ke/yLKwd5ZRpfHaKHzAOunaG4WumT /kp1QQXxcCaBa82GNUwoNalQaYkjaljLPM6hL3YA6Z7ioCRwWs6iZHwZ61k8C0PW 3Svvwt2nhkl6Rjznqk3xnaujlhPDe7Pe8fWDfuaKat4+5xrNXRxYb1RYDN9qOrV8 = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=z+DPq3oEd8+fJSPpwhhlIham4s4=; b=h4WhWhqaG+IdUH0QG +vlVXY/q1Blbv3U9sLj9S/o0126efBbw88NS/oWcgbDYc3v73AHhVm2MRFVpfkIW XdFD8kEseTOjfK6SN6UiFIgQFkN8K1pLFrQyURfHyc1CBSGl7t4v6iv6JzZ4oZLK C7xp+TCe92f2mcuv6RZDrMElJc= Received: (qmail 12335 invoked by alias); 1 May 2014 20:01:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 12321 invoked by uid 89); 1 May 2014 20:01:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mail-out.m-online.net X-Auth-Info: H71rTp2/qtOxqMiEDaxSLGRC9n1Ejxrn98wHK/2ncMU= From: Andreas Schwab To: Siddhesh Poyarekar Cc: Mike Frysinger , libc-alpha@sourceware.org, Roland McGrath Subject: Re: [PATCH 2/2] Initialize all of datahead structure in nscd [BZ #16791] References: <20140401164104.GH16484@spoyarek.pnq.redhat.com> <24966439.irburZmzZi@vapier> <20140402094011.GD23931@spoyarek.pnq.redhat.com> <2541735.7QtA0LDnTJ@vapier> <20140403150921.GA5063@spoyarek.pnq.redhat.com> X-Yow: They don't hire PERSONAL PINHEADS, Mr. Toad! Date: Thu, 01 May 2014 22:01:30 +0200 In-Reply-To: <20140403150921.GA5063@spoyarek.pnq.redhat.com> (Siddhesh Poyarekar's message of "Thu, 3 Apr 2014 20:39:21 +0530") Message-ID: <87y4yluv39.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Siddhesh Poyarekar writes: > diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h > index c069bf6..ee16df6 100644 > --- a/nscd/nscd-client.h > +++ b/nscd/nscd-client.h > @@ -240,12 +240,17 @@ static inline time_t > datahead_init_common (struct datahead *head, nscd_ssize_t allocsize, > nscd_ssize_t recsize, uint32_t ttl) > { > + /* Initialize so that we don't write out junk in uninitialized data to the > + cache. */ > + memset (head, 0, sizeof (*head)); nscd-client.h: In function ‘datahead_init_common’: nscd-client.h:245:3: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration] memset (head, 0, sizeof (*head)); ^ nscd-client.h:245:3: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default] Andreas. * nscd/nscd-client.h: Include . diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index ee16df6..cabba49 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -24,6 +24,7 @@ #include #include +#include #include #include #include