On Thu, Sep 24, 2009 at 03:13:18PM -0700, Jeremy Allison wrote:
> On Fri, Sep 25, 2009 at 12:00:10AM +0200, Matthias Dieter Wallnöfer wrote:
> > Hi Volker,
> > all should be alright now. I hope you are satisfied with my correction
> > methods. Otherwise please comment!
> I don't think these are correct.
> str_list_make and str_list_make_v3 should *not* return const
> strings. They're never used in that way in the code and in
> the test harness they're expected to return char **,
> not const char **. You're having to cast away const
> in every usage. This is a sign you've got the API
> Look at what it's doing. It's taking a const char *
> and splitting it into an allocated list so it can be
> changed. It needs to return char **.
> You can allways assign char ** to const char ** without
> a cast, it's the other way round (the way you have now)
> that causes the problem.
I'm reverting the changes you made, and fixing the
lib/util/util_str.c file to correctly use const.