]> sigrok.org Git - libsigrokdecode.git/blobdiff - util.c
Build: Reduce autogen.sh to trivial stub
[libsigrokdecode.git] / util.c
diff --git a/util.c b/util.c
index 1efaa843a603988bece2f59a9680ef06d71c08c8..764474ba2a6e461814e53b574cd87dbecfb81dd9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -18,8 +18,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
 #include "config.h"
 
 /**
@@ -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)