summaryrefslogtreecommitdiff
path: root/decoder.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-02-10 00:06:58 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-02-10 09:30:41 +0100
commita61ece2022f9e765d65dcd0ed22dba7e71e138a2 (patch)
treed8804a8808ca70bd23149e5de4329272608e95d7 /decoder.c
parenta33a0e3bd59214cc4ddb021389f5c2ad91134587 (diff)
downloadlibsigrokdecode-a61ece2022f9e765d65dcd0ed22dba7e71e138a2.tar.gz
libsigrokdecode-a61ece2022f9e765d65dcd0ed22dba7e71e138a2.zip
srd: Add/improve g_malloc() error messages.
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder.c b/decoder.c
index 557aa71..731ab16 100644
--- a/decoder.c
+++ b/decoder.c
@@ -95,6 +95,7 @@ static int get_probes(struct srd_decoder *d, char *attr, GSList **pl)
}
if (!(p = g_try_malloc(sizeof(struct srd_probe)))) {
+ srd_err("Failed to g_malloc() struct srd_probe.");
ret = SRD_ERR_MALLOC;
goto err_out;
}
@@ -138,7 +139,7 @@ SRD_API int srd_load_decoder(const char *name, struct srd_decoder **dec)
py_basedec = py_method = py_attr = NULL;
if (!(d = g_try_malloc0(sizeof(struct srd_decoder)))) {
- srd_dbg("Failed to malloc struct srd_decoder.");
+ srd_dbg("Failed to g_malloc() struct srd_decoder.");
ret = SRD_ERR_MALLOC;
goto err_out;
}