From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932084AbcGGLGO (ORCPT ); Thu, 7 Jul 2016 07:06:14 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:18884 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbcGGLFz (ORCPT ); Thu, 7 Jul 2016 07:05:55 -0400 Date: Thu, 7 Jul 2016 12:04:53 +0100 From: Eric Engestrom To: Markus Mayer CC: Andrew Morton , Al Viro , Rasmus Villemoes , Chris Metcalf , Kees Cook , , , , , , , , , Subject: Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings Message-ID: <20160707110453.GC3417@imgtec.com> References: <1467751631-22878-1-git-send-email-mmayer@broadcom.com> <1467751631-22878-2-git-send-email-mmayer@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <1467751631-22878-2-git-send-email-mmayer@broadcom.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [10.60.4.28] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 05, 2016 at 01:47:05PM -0700, Markus Mayer wrote: > All functions return a pointer to the terminating '\0' character in the > modified string ("dst" or "s", respectively). I think this is going to be confusing. From the man: The strcpy() and strncpy() functions return a pointer to the destination string dest. I think it would be better to keep the same behaviour, especially since you used the same name for your functions (which I think is sensible), not to mention you don't use this return value in any of your calls. (IMHO strcpy() shouldn't have had a return value and neither should your functions, but since it does, yours should match.) Cheers, Eric