From patchwork Mon Jul 13 21:11:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 51083 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 386DF20319 for ; Mon, 13 Jul 2015 21:12:10 +0000 (UTC) Received: by laef2 with SMTP id f2sf10395852lae.0 for ; Mon, 13 Jul 2015 14:12:08 -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=jdE7tr6bBwbV1ezAEZUQdPSvyRe18S2i7QzfjbNJoZMHjCYnU8elioWsJPx8PpjHsT ddJMnzUKJukucEBW9YkuuqcZaB2WacWzkl/FLoZWDgC375A09ivfF67LEY++uwZ0zsoj tGl4vLSHwiuNA37ifa5+8+An/OQD769oYrte4LAtJZClS/JnOr7zZDa0KTsiOu8stXVw SxP4Z9e1eDGINNDth95Qh0qRirQrnRS1AvkCnu1ap0tfax9YU9djiqvQ/2Rt23tmhaNN P4Ol7hChPMV226KdGBrTdU19GdDDqAWaVaCpWM2CEs58RuVJR94S5ntnNdDSH6YRZtAb NP+Q== X-Gm-Message-State: ALoCoQlMdOjXdMDS44WR0NUlXXkBaKmRNlm6wBYSw0PUVWvBwubXuaCk4NWTUN9qHAR/VZ1XulBP X-Received: by 10.112.142.67 with SMTP id ru3mr19278437lbb.1.1436821928716; Mon, 13 Jul 2015 14:12:08 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.131 with SMTP id w3ls1584690lal.81.gmail; Mon, 13 Jul 2015 14:12:08 -0700 (PDT) X-Received: by 10.152.6.196 with SMTP id d4mr34912510laa.77.1436821928555; Mon, 13 Jul 2015 14:12:08 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id k7si16355989lbj.50.2015.07.13.14.12.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2015 14:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lahh5 with SMTP id h5so24336725lah.2 for ; Mon, 13 Jul 2015 14:12:08 -0700 (PDT) X-Received: by 10.112.220.7 with SMTP id ps7mr33968900lbc.72.1436821928125; Mon, 13 Jul 2015 14:12:08 -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 hn6csp1962927lbb; Mon, 13 Jul 2015 14:12:07 -0700 (PDT) X-Received: by 10.140.90.99 with SMTP id w90mr56522596qgd.57.1436821926864; Mon, 13 Jul 2015 14:12:06 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g9si22507301qgf.41.2015.07.13.14.12.06; Mon, 13 Jul 2015 14:12:06 -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 0DEE161E2A; Mon, 13 Jul 2015 21:12:06 +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_H3, RCVD_IN_MSPIKE_WL, 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 3A76661E25; Mon, 13 Jul 2015 21:11:43 +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 50D3F61E26; Mon, 13 Jul 2015 21:11:37 +0000 (UTC) Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com [209.85.214.173]) by lists.linaro.org (Postfix) with ESMTPS id 691C661D10 for ; Mon, 13 Jul 2015 21:11:36 +0000 (UTC) Received: by obbgp5 with SMTP id gp5so125254231obb.0 for ; Mon, 13 Jul 2015 14:11:36 -0700 (PDT) X-Received: by 10.202.68.213 with SMTP id r204mr30951228oia.97.1436821896004; Mon, 13 Jul 2015 14:11:36 -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 d70sm10658342oih.16.2015.07.13.14.11.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Jul 2015 14:11:35 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 13 Jul 2015 16:11:29 -0500 Message-Id: <1436821890-6964-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436821890-6964-1-git-send-email-bill.fischofer@linaro.org> References: <1436821890-6964-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH 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.42 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) {