[Patches] No backtrace/panic action called from python tools (bug #13469)

Stefan Metzmacher metze at samba.org
Tue Jun 12 07:11:17 UTC 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180612/6c435f5b/signature.sig>


More information about the samba-technical mailing list