From: Gerhard Sittig Date: Mon, 10 Oct 2016 16:25:37 +0000 (+0200) Subject: nit: break a long line in different ways, unobfuscate parameter grouping X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=d1347eff2dc600ee4bfc122736927e8077d3ecf5;p=libsigrokdecode.git nit: break a long line in different ways, unobfuscate parameter grouping Break a rather long line for a Python method call at a different location, to better reflect the parameter groups which organize for the method to get called, and those which pass parameters to that called method. This commit also splits the actual action and its check for successful execution into separate C language statements. --- diff --git a/type_decoder.c b/type_decoder.c index cf7ec8e..5a1e1a8 100644 --- a/type_decoder.c +++ b/type_decoder.c @@ -482,9 +482,9 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args) start_sample, end_sample, output_type_name(pdo->output_type), output_id, pdo->proto_id, next_di->inst_id); - if (!(py_res = PyObject_CallMethod( - next_di->py_inst, "decode", "KKO", start_sample, - end_sample, py_data))) { + py_res = PyObject_CallMethod(next_di->py_inst, "decode", + "KKO", start_sample, end_sample, py_data); + if (!py_res) { srd_exception_catch("Calling %s decode() failed", next_di->inst_id); }