summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2016-10-10 18:25:37 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2022-11-24 13:13:58 +0100
commitd1347eff2dc600ee4bfc122736927e8077d3ecf5 (patch)
tree8fd603211a51f1566ceb5a3c94d5a3fb1b390e5b
parente303fd42917f4e15a06c9da5912344c8566fffb0 (diff)
downloadlibsigrokdecode-d1347eff2dc600ee4bfc122736927e8077d3ecf5.tar.gz
libsigrokdecode-d1347eff2dc600ee4bfc122736927e8077d3ecf5.zip
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.
-rw-r--r--type_decoder.c6
1 files changed, 3 insertions, 3 deletions
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);
}