This is the mail archive of the
mailing list for the glibc project.
Re: [open-source] Re: Wish for 2002
- From: "Martin v. Loewis" <martin at v dot loewis dot de>
- To: daw at cs dot berkeley dot edu
- Cc: eggert at twinsun dot com, dwheeler at ida dot org, leclerc at austin dot sns dot slb dot com, libc-alpha at sources dot redhat dot com, open-source at csl dot sri dot com
- Date: Sat, 5 Jan 2002 00:07:40 +0100
- Subject: Re: [open-source] Re: Wish for 2002
- References: <200201042216.g04MGbw01367@mozart.cs.berkeley.edu>
> 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.