register events

jra at dp.samba.org jra at dp.samba.org
Wed May 7 05:44:27 GMT 2003


On Wed, May 07, 2003 at 07:16:57AM +0200, Stefan (metze) Metzmacher wrote:
> At 05:07 07.05.2003 +0000, jra at dp.samba.org wrote:
> >On Wed, May 07, 2003 at 07:05:59AM +0200, Stefan (metze) Metzmacher wrote:
> > >
> > > what will  be better:
> > >
> > > int smb_register_*_event(event_struct *event)
> > > {
> > >                  return event_id;
> > > }
> >
> >Errr. None of them. typedef a new int type of smb_event_t
> >and return that - #define zero as SMB_REGISTER_EVENT_FAIL
> >(I'm expecting the only possible failure will be ENOMEM).
> 
> ok. substitute int with smb_event_id_t
> 
> but with kind of funtion would you preferr? the first on?

Yes, if there is only one kind of error (ENOMEM) that
can be returned.

Jeremy.


More information about the samba-technical mailing list