From 73578d2ececd3a285ee3bb231de5d074195b6514 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Tue, 15 May 2018 22:29:49 +0200 Subject: get_current_pinvalues(): Slightly simplify a code chunk. --- type_decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'type_decoder.c') diff --git a/type_decoder.c b/type_decoder.c index 16e25a7..a01d785 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -518,14 +518,13 @@ static PyObject *get_current_pinvalues(const struct srd_decoder_inst *di) PyObject *py_pinvalues; PyGILState_STATE gstate; - gstate = PyGILState_Ensure(); - if (!di) { srd_err("Invalid decoder instance."); - PyGILState_Release(gstate); return NULL; } + gstate = PyGILState_Ensure(); + py_pinvalues = PyTuple_New(di->dec_num_channels); for (i = 0; i < di->dec_num_channels; i++) { -- cgit v1.2.3-70-g09d2