[Patches] No backtrace/panic action called from python tools (bug #13469)
Daniele Dario
d.dario76 at gmail.com
Tue Jun 12 07:13:53 UTC 2018
On Tue, 2018-06-12 at 09:11 +0200, Stefan Metzmacher wrote:
> Hi,
>
> > +static PyObject *py_fault_setup(PyObject *self)
> > +{
> > + static bool done;
> > + if (!done) {
> > + fault_setup();
> > + done = true;
> > + }
> > + Py_RETURN_NONE;
> > +}
> >
> > shouldn't done be initialized to false or am I missing something?
>
> 'static' variables are always initialized with 0 (false)
> and an explicit initialization would just add code that would dirty
> the related pages even if that function isn't used.
>
> metze
>
Oh thanks. Didn't know that. This is really a great forge to learn
things :-)
Daniele.
More information about the samba-technical
mailing list