X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=util.c;h=be14041ce5147a1dcf616000bdcfb8729cd915b4;hb=c6bfbc0043089e006c684bcce609da50aadded81;hp=1efaa843a603988bece2f59a9680ef06d71c08c8;hpb=62a2b15ce3fe6af6867c30cfc9c14c01d201a898;p=libsigrokdecode.git
diff --git a/util.c b/util.c
index 1efaa84..be14041 100644
--- a/util.c
+++ b/util.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
-#include "config.h"
+#include
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
/**
* Get the value of a Python object's attribute, returned as a newly
@@ -145,11 +145,7 @@ SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr)
goto err_out;
}
- if (!(*outstr = g_strdup(str))) {
- srd_dbg("Failed to g_malloc() outstr.");
- ret = SRD_ERR_MALLOC;
- goto err_out;
- }
+ *outstr = g_strdup(str);
err_out:
if (py_encstr)