User: Password:
|
|
Subscribe / Log in / New account

The ups and downs of strlcpy()

The ups and downs of strlcpy()

Posted Jul 19, 2012 23:26 UTC (Thu) by quotemstr (subscriber, #45331)
In reply to: The ups and downs of strlcpy() by nix
Parent article: The ups and downs of strlcpy()

The parameter order seems fine to me --- you have (buffer, size_of_buffer) pairs. How would you do it?


(Log in to post comments)

The ups and downs of strlcpy()

Posted Jul 20, 2012 12:46 UTC (Fri) by nix (subscriber, #2304) [Link]

The problem with that parameter order is simply that it's completely different from everything else in the C library. Everything else packs the size-of arguments together, although one could argue that this is because they normally relate to element and array size of a single entity.

Ah well, I'm picking nits anyway. The argument order is abominable *to me*, and I'd never get it right without looking it up, but this is a personal stylistic foible.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds