From patchwork Tue Oct 13 23:39:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Pettit X-Patchwork-Id: 529952 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 412D9140E43 for ; Wed, 14 Oct 2015 10:39:11 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 1F4D0106E0; Tue, 13 Oct 2015 16:39:10 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 0D2A910662 for ; Tue, 13 Oct 2015 16:39:09 -0700 (PDT) Received: from bar4.cudamail.com (bar2 [192.168.15.2]) by mx3v1.cudamail.com (Postfix) with ESMTP id C0D506185D4 for ; Tue, 13 Oct 2015 17:39:07 -0600 (MDT) X-ASG-Debug-ID: 1444779547-03dc21430a22910001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar4.cudamail.com with ESMTP id YouhWAl8vCWeYrTL (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 13 Oct 2015 17:39:07 -0600 (MDT) X-Barracuda-Envelope-From: jpettit@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f51.google.com) (209.85.220.51) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 13 Oct 2015 23:39:07 -0000 Received-SPF: unknown (mx3-pf1.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.51 Received: by pabrc13 with SMTP id rc13so34985601pab.0 for ; Tue, 13 Oct 2015 16:39:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=YE2v+myrACPpkTszuaJRTQ2ygDSOyr4iDogIN2fBQtY=; b=lsnzyZ6zvZd+tgU5osjOcoizEcEMXsShO1bKaFqSBuDE3FH4CS2NpJJPAGHMjtRktf g/JBq9yJlqf8MCPEnUiJf4eaX9xjhqK4I8QQeFUUvljJy+XE1B/yue9ypHPoox/fDTAi 0n/NQfurNu9s2DPFpHEh0/sNVOKn1TwXK86pO6+36A5vizG1KTY0iuIA0tbi+qwE6Oag 9UH4ky9BU1W/KuOGrCSfSI3GyOedzV/kgHJUMwWFOcpF3sC1XPPWqqBugyIl3DJbe2MV UO4XPF1EfDCvkpa3mstBne60DDfOx27UKQHLadvtEhFzaRzLg+impfd2mCDCW+bLYfhM ZGxw== X-Gm-Message-State: ALoCoQl/Fx3L12k139HC3hIt6k30WNsm7kIlJTY9EyZqbaB6eAiTXYns8hbJuk13lol5NJ2YsbnF X-Received: by 10.67.15.100 with SMTP id fn4mr139973pad.120.1444779546883; Tue, 13 Oct 2015 16:39:06 -0700 (PDT) Received: from localhost.localdomain ([208.91.2.4]) by smtp.gmail.com with ESMTPSA id i9sm5862426pbq.84.2015.10.13.16.39.05 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Oct 2015 16:39:06 -0700 (PDT) X-CudaMail-Envelope-Sender: jpettit@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.2.4 From: Justin Pettit To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-1012075236 X-CudaMail-DTE: 101315 X-CudaMail-Originating-IP: 209.85.220.51 Date: Tue, 13 Oct 2015 16:39:01 -0700 X-ASG-Orig-Subj: [##CM-V1-1012075236##][PATCH 3/3] expr: Document error handling for expr_annotate(). Message-Id: <1444779541-80516-3-git-send-email-jpettit@nicira.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1444779541-80516-1-git-send-email-jpettit@nicira.com> References: <1444779541-80516-1-git-send-email-jpettit@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1444779547 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 3/3] expr: Document error handling for expr_annotate(). X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Justin Pettit Acked-by: Ben Pfaff --- ovn/lib/expr.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c index 8270b82..8ec62b5 100644 --- a/ovn/lib/expr.c +++ b/ovn/lib/expr.c @@ -1480,7 +1480,10 @@ expr_annotate__(struct expr *expr, const struct shash *symtab, * - Expands references to predicate symbols, by replacing them by the * expressions that they expand to. * - * In each case, annotation occurs recursively as necessary. */ + * In each case, annotation occurs recursively as necessary. + * + * On failure, returns NULL and sets '*errorp' to an explanatory error + * message, which the caller must free. */ struct expr * expr_annotate(struct expr *expr, const struct shash *symtab, char **errorp) {