Re: [RFC] Some useless cleanup

From: Bernd Petrovitsch (bernd@gams.at)
Date: Fri May 10 2002 - 03:20:00 EST


Erik Andersen <andersen@codepoet.org> wrote:
>char * safe_strncpy(char *dst, const char *src, size_t size)
>{
> dst[size-1] = '\0';
> strncpy(dst, src, size-1);
>}

Maybe just call it strlcpy() similar to others :
e.g. http://www.tac.eu.org/cgi-bin/man-cgi?strlcpy+3

        bernd

-- 
Bernd Petrovitsch                              Email : bernd@gams.at
g.a.m.s gmbh                                  Fax : +43 1 205255-900
Prinz-Eugen-Straße 8                    A-1040 Vienna/Austria/Europe
                     LUGA : http://www.luga.at

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:13 EST