From owner-svn-src-projects@freebsd.org Sun Aug 9 17:48:28 2015 Return-Path: Delivered-To: svn-src-projects@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 E9E3A99D354 for ; Sun, 9 Aug 2015 17:48:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) (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 B7AE6F85 for ; Sun, 9 Aug 2015 17:48:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by obbfr1 with SMTP id fr1so72822970obb.1 for ; Sun, 09 Aug 2015 10:48:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ehPZW0juq8gNROQWDPvUwrK+sBL4ednlr9FruMFm9bM=; b=MLDBbMH+X7NtKm5fadSWusM8PSiIgOJQ38poBO42oYHKBJUDtMdV4NbyAhR5SYGHFa xgMQFw/UTW928MXmyvVX0ztKSNI9IYvx3LS9NJDUG65JF6i8K27G6kfAxutME9yuU/gC GgO3TzbmHb7VKedegWWpDKRlBTiY3+bvBiWxJFyE/y7g0gSV+My8luYZK21FLSin+m9b b7WQdoYivicS+xV/WgisdjCGijWjgRrj9I39weAmZUZg8LGou3kFRfyAMo3cIrvitqsH FDNWh/asNNfLrlmYcc9GaUNJSUHZ3oBDqoWbxGpPFGUUbwEhfiFNeVKDGz+PXIRL1Flp I0pQ== X-Gm-Message-State: ALoCoQm51ss/i0M/9VNQmzYyVoHVPebpjfCLSQNwsomTTXN8r7aYmfQEG74ZPm7GgxZnP9rtdsok MIME-Version: 1.0 X-Received: by 10.182.20.141 with SMTP id n13mr16848079obe.26.1439142502388; Sun, 09 Aug 2015 10:48:22 -0700 (PDT) Received: by 10.76.50.84 with HTTP; Sun, 9 Aug 2015 10:48:22 -0700 (PDT) X-Originating-IP: [84.27.222.46] In-Reply-To: References: <201508091150.t79Boo3v096088@repo.freebsd.org> <20150809223647.O2415@besplex.bde.org> <20150809163935.GA96980@ivaldir.etoilebsd.net> Date: Sun, 9 Aug 2015 19:48:22 +0200 Message-ID: Subject: Re: svn commit: r286521 - projects/collation/lib/libc/locale From: Ed Schouten To: David Chisnall Cc: Baptiste Daroussin , Bruce Evans , src-committers , svn-src-projects@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2015 17:48:29 -0000 2015-08-09 19:02 GMT+02:00 David Chisnall : > As I said in the code review, when we=E2=80=99re doing a printf and some = file I/O, the cost of a short-lived heap allocation is likely to be in the = noise. Exactly. Furthermore, it isn't required that implementations define PATH_MAX. The maximum pathname length is not necessarily fixed. I personally prefer calling malloc() instead of silently truncating strings. --=20 Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK/VAT number: 62051717