summaryrefslogtreecommitdiff
path: root/decoder.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2011-12-04 23:36:52 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2011-12-04 23:36:52 +0100
commit09b0acbb8dd292794e7fc797352cda47c27a1355 (patch)
tree35cf6314dd332ed73e3d77037ebb79fde32a9e91 /decoder.c
parent1c8ac5bf07e0ded582234c9ef50ba10f042bae52 (diff)
downloadlibsigrokdecode-09b0acbb8dd292794e7fc797352cda47c27a1355.tar.gz
libsigrokdecode-09b0acbb8dd292794e7fc797352cda47c27a1355.zip
srd: Bring back the 'id' field and use it.
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/decoder.c b/decoder.c
index 7753a33..e69eae8 100644
--- a/decoder.c
+++ b/decoder.c
@@ -96,8 +96,8 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec)
if (!(d = malloc(sizeof(struct srd_decoder))))
return SRD_ERR_MALLOC;
- /* We'll just use the name of the module for the ID. */
- d->id = strdup(name);
+ if ((r = h_str(py_res, py_mod, "id", &(d->id))) < 0)
+ return r;
if ((r = h_str(py_res, py_mod, "name", &(d->name))) < 0)
return r;