From patchwork Mon May 18 11:17:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 473340 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 AFE2814029C for ; Mon, 18 May 2015 21:17:29 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=sourceware.org header.i=@sourceware.org header.b=c76Qwmo5; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=ccD6 bNmq77VOWYJfoAna/cGmy/n5vd8DTvxkfRx2Wm4A8U7Du+QPhn8SmwQzT5NWiVZs 3NXZFh7lq1GOhZasCSVFHmqjakZBDoFmHIJWJEB4pkTAWXm0DBtM5h1JH9WAHODe T//QCVdm/UDEfs5DBvHkyEHeF+jT/MdNdZGUYVk= 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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=mWR8VNndnD kgqjLX1rZd4bmcJxA=; b=c76Qwmo5w1T426WJv/7VbMgzXundlP2v1ZycJDBSNb VHYrSQCBd2xa/+4LAbuehSKXAyAy3xSAenE4/G/RKiE4Mkh1TX6m4WXi/FtIeGce lz2z4Z9wy+FZur1KuIiPDbdZ+cGXCM17x3EksfaYWE6lNMilRL907OD3QwPJIkpI E= Received: (qmail 97318 invoked by alias); 18 May 2015 11:17:21 -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 97308 invoked by uid 89); 18 May 2015 11:17:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Date: Mon, 18 May 2015 16:47:13 +0530 From: Siddhesh Poyarekar To: Florian Weimer Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] Add envz_remove to the libc manual Message-ID: <20150518111713.GF15498@spoyarek.pnq.redhat.com> References: <20150318082908.GH5023@spoyarek.pnq.redhat.com> <550A0D65.3030206@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <550A0D65.3030206@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) On Thu, Mar 19, 2015 at 12:42:29AM +0100, Florian Weimer wrote: > The safety annotations are incorrect, see envz_add and argz_delete: > > @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}} > @c Calls envz_remove, which calls enz_entry and argz_delete, and then > @c argz_add or equivalent code that reallocs and appends name=value. > > @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}} > @c Calls free if no argument is left. Right, I'll push the following patch with the annotations fixed up. Siddhesh * manual/string.texi (Envz Functions): Add envz_remove. diff --git a/manual/string.texi b/manual/string.texi index 397c181..c53e73a 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -2788,5 +2788,13 @@ The @code{envz_strip} function removes any null entries from @var{envz}, updating @code{*@var{envz}} and @code{*@var{envz_len}}. @end deftypefun +@comment envz.h +@comment GNU +@deftypefun {void} envz_remove (char **@var{envz}, size_t *@var{envz_len}, const char *@var{name}) +@safety{@prelim{}@mtsafe{}@asunsafe{@acsuheap{}}@acunsafe{@acsmem{}}} +The @code{envz_remove} function removes an entry named @var{name} from +@var{envz}, updating @code{*@var{envz}} and @code{*@var{envz_len}}. +@end deftypefun + @c FIXME this are undocumented: @c strcasecmp_l @safety{@mtsafe{}@assafe{}@acsafe{}} see strcasecmp