From owner-svn-src-all@freebsd.org Mon Sep 18 15:09:55 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71124E16906; Mon, 18 Sep 2017 15:09:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.161.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 374FC6CB8A; Mon, 18 Sep 2017 15:09:54 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-yw0-f194.google.com with SMTP id s62so54436ywg.4; Mon, 18 Sep 2017 08:09:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=LqAImCQgFqvmauKccppPK6ZKobhhri91vkLRFySTnFQ=; b=CpJ8fmtLoC6NwxTK5p3QRXGazdIl+pH9FPXas43YwDumjL84hcpG9PrVjCdmiFCxas 4HGTxrCbO3k4rUGUYjC5K6ThkVazUcCYkR/gSDfhg3Zk/XzYha9cvgWGDwOANftBWI6D 55dIpY5Y9w81swPm7wZqoYgXGr7CpYm7btKr/5svoEFE03YXGmXz37pvYULIqA4wQgdy tM/OeMZRVCksr5CKJ8+YPAXaPEVt/aFzyqUlmJjHJRx9npIXaO+5xgCSjVB7yvTg3nYV Q0GJHItB9XEwgoy7RYopAVEOOioDKTILpoDgHg01sEW1DLqLqVyl9PtU4LG9qaM9GyMK UZXQ== X-Gm-Message-State: AHPjjUi522bTv5vn1d4sTdj/17IA3EMMhwsdxAD6EwTdu93IBtsjrUqT dcFdPaUbO5yUTojlj2Y= X-Received: by 10.37.129.69 with SMTP id j5mr771619ybm.31.1505747388340; Mon, 18 Sep 2017 08:09:48 -0700 (PDT) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com. [209.85.214.45]) by smtp.gmail.com with ESMTPSA id w137sm3075003ywd.9.2017.09.18.08.09.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 08:09:48 -0700 (PDT) Received: by mail-it0-f45.google.com with SMTP id r131so6494410itc.1; Mon, 18 Sep 2017 08:09:48 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDyi7a/HvdGRhGO26mVfHJoqI1ta6o7KAs7Hz3gKBd9dum/RMjc3jB1iOHk6XSojlW3yg9jokS1tcn09lKL2zU= X-Received: by 10.36.84.81 with SMTP id t78mr16261158ita.117.1505747387310; Mon, 18 Sep 2017 08:09:47 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.81.131 with HTTP; Mon, 18 Sep 2017 08:09:46 -0700 (PDT) In-Reply-To: References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Conrad Meyer Date: Mon, 18 Sep 2017 08:09:46 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Hans Petter Selasky Cc: Conrad Meyer , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 15:09:55 -0000 Seems unhelpful here, as the maximum length of "226:%d" is shorter than the buffer. On Mon, Sep 18, 2017 at 3:38 AM, Hans Petter Selasky wrote: > On 09/18/17 01:40, Conrad Meyer wrote: >> >> + sprintf(chardevname, "226:%d", >> + device_get_unit(dev)); > > > Hi, > > Try to use snprintf(). Define the chardevname size as a macro, or just > allocate it on the stack if it is < 32 bytes. > > --HPS