Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1438524
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings |
| Date | 2016-07-07 13:10 +0200 |
| Message-ID | <rSflT-66A-1@gated-at.bofh.it> (permalink) |
| References | <rRFs5-7Ol-5@gated-at.bofh.it> <rRFs5-7Ol-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/7] lib: string: add functions to case-convert strings Markus Mayer <mmayer@broadcom.com> - 2016-07-05 22:50 +0200
Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings Eric Engestrom <eric.engestrom@imgtec.com> - 2016-07-07 13:10 +0200
Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-07-08 02:30 +0200
Re: [PATCH v2 1/7] lib: string: add functions to case-convert strings Markus Mayer <markus.mayer@broadcom.com> - 2016-07-08 20:10 +0200
csiph-web