This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [open-source] Re: Wish for 2002


> Could you elaborate on how the strl*() functions make it harder to
> maintain GNU code?  I had trouble seeing how they are any different from
> other forms of safe buffer manipulation (e.g., strncpy()).
> 
> The main burden on the programmer is that one must pass buffer sizes
> along with all buffers.

If you program in a style where there are no limited buffer sizes, but
where everything is allocated dynamically, there is no need to always
carry the length of each string around. If you ever need it, you
calculate it dynamically. Passing additional redundant variables
around is a distraction from the main algorithm, and a possible source
of additional bugs.

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]