[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CVS Commit of 'dpkg/utils start-stop-daemon.c'

On Sun, Nov 21, 1999 at 12:00:30AM +0100, Wichert Akkerman wrote:
> Previously Ben Collins wrote:
> > I noticed you switched this to use strtok() on optarg, which I think is
> > probably not a good idea since it actually changes the contents of optarg.
> > It think it needs to be changed back.
> There is absolutely no harm in modifying optarg.. it's not the first
> time I did it. It's safe since we never add any data but only change
> the seperator-character to a nul-character.

It should atleast be strdup'd so we don't change the actual optarg. Future
additions to the program might depend on the arg being unchanged, so we
shouldn't make it more difficult in this way.

/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`     bcollins@debian.org  -  collinbm@djj.state.va.us  -  bmc@visi.net    '

Reply to: