Confused: bad ptr conversion?

Christopher R. Hertel crh at nts.umn.edu
Mon Jul 10 14:49:29 GMT 2000


I'm fairly certain that it is just plain wrong, but I was hoping that the 
responsible party would be able to prove me insane.

Chris -)-----

> On Sun, 9 Jul 2000, Christopher R. Hertel wrote:
> 
> > Someone take a look at this and tell me what I'm missing.
> > 
> > In function lp_do_parameter(), file param/loadparm.c, line 2475.
> > 
> >         /* if it is a special case then go ahead */
> >         if (parm_table[parmnum].special)
> >         {
> >                 parm_table[parmnum].special(pszParmValue, (char **)parm_ptr);
> >                 return (True);
> >         }
> > 
> > There's a typecast in there that takes a (char *) and converts it to a
> > (char **).  I think that this should be &parm_ptr instead of (char 
> > **parm_ptr).
> 
> it does look weird, not helped by dflt_ptr being a void* not a char**.
> 
> 


-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz



More information about the samba-technical mailing list