projects
/
libsigrokdecode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8ac5b
)
srd: Bring back the 'id' field and use it.
author
Uwe Hermann
<uwe@hermann-uwe.de>
Sun, 4 Dec 2011 22:36:52 +0000
(23:36 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Sun, 4 Dec 2011 22:36:52 +0000
(23:36 +0100)
decoder.c
patch
|
blob
|
history
diff --git
a/decoder.c
b/decoder.c
index 7753a33f00de04663f486bba8e533a744a0ec6fe..e69eae8da694ff77ef2e2dec7fecbdd70866c818 100644
(file)
--- 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;