From patchwork Tue Jul 14 11:52:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51102 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 44A56202B9 for ; Tue, 14 Jul 2015 11:52:47 +0000 (UTC) Received: by lagw2 with SMTP id w2sf2178351lag.3 for ; Tue, 14 Jul 2015 04:52:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=eKW/YJRznIwDwlfw+mmM0OdWns00vp5CBlYCKSl56vg=; b=m8mW9t2g2LCwtrXCaDXa9AiXTmPsTuS9uQv/pws8GV72Axo1vwraGWkD+VeitxDPrb mb6wNafZlaZYjx2rj6JwGgkHYtyQkxznmE3fhoHq3UhThg3j9hLft7yR9lfsLzkla+xG uoE3xsbeZu1dSRxLbOPq2/fhfKUEpp5p5QNUid8PMn8kHcaTnn66NRGIAFvv2waojOvx oIQf1bRwmerBZplX9LFtvBAngYl+P5IrcPicyWS4QFMau7SNjdqyjeSvD0jTX1Lz7hpQ 1W1kr3b0HoNVAY9mCsd4WB8WxTOA3LruzP9q4cTs+nYtBAsqwXU1olYSxUxFaK3JPvGT tRrA== X-Gm-Message-State: ALoCoQnRIpWRWL+bd0007KCWgRsLmTFlKL38Bbl4luP5Sc153W1po8LONCFBHdx3iO5+MU8vctG8 X-Received: by 10.180.216.12 with SMTP id om12mr1319129wic.1.1436874766259; Tue, 14 Jul 2015 04:52:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.178.164 with SMTP id cz4ls39325lac.3.gmail; Tue, 14 Jul 2015 04:52:46 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr36915432lbc.112.1436874766094; Tue, 14 Jul 2015 04:52:46 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id bn6si711247lbc.95.2015.07.14.04.52.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2015 04:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by lagw2 with SMTP id w2so4489667lag.3 for ; Tue, 14 Jul 2015 04:52:46 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr36915418lbc.112.1436874765989; Tue, 14 Jul 2015 04:52:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2331960lbb; Tue, 14 Jul 2015 04:52:45 -0700 (PDT) X-Received: by 10.140.216.20 with SMTP id m20mr63823307qhb.37.1436874764765; Tue, 14 Jul 2015 04:52:44 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b102si742474qga.35.2015.07.14.04.52.44; Tue, 14 Jul 2015 04:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id D8CCF61E38; Tue, 14 Jul 2015 11:52:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C6BFE61DA5; Tue, 14 Jul 2015 11:52:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 1BAB661CD9; Tue, 14 Jul 2015 11:52:16 +0000 (UTC) Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by lists.linaro.org (Postfix) with ESMTPS id 4D2BF61B6E for ; Tue, 14 Jul 2015 11:52:15 +0000 (UTC) Received: by oihq81 with SMTP id q81so4594439oih.2 for ; Tue, 14 Jul 2015 04:52:14 -0700 (PDT) X-Received: by 10.182.142.74 with SMTP id ru10mr31204909obb.75.1436874734893; Tue, 14 Jul 2015 04:52:14 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id c203sm325622oig.12.2015.07.14.04.52.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Jul 2015 04:52:14 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 14 Jul 2015 06:52:07 -0500 Message-Id: <1436874728-5160-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436874728-5160-1-git-send-email-bill.fischofer@linaro.org> References: <1436874728-5160-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 2/3] linux-generic: queue: allow for anonymous queues X-BeenThere: lng-odp@lists.linaro.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: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Bill Fischofer --- platform/linux-generic/odp_queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index 2546e2b..31d76ef 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -52,7 +52,10 @@ queue_entry_t *get_qentry(uint32_t queue_id) static void queue_init(queue_entry_t *queue, const char *name, odp_queue_type_t type, odp_queue_param_t *param) { - strncpy(queue->s.name, name, ODP_QUEUE_NAME_LEN - 1); + if (name) + strncpy(queue->s.name, name, ODP_QUEUE_NAME_LEN - 1); + else + memset(queue->s.name, 0, sizeof(queue->s.name)); queue->s.type = type; if (param) {