]> sigrok.org Git - libsigrokdecode.git/blobdiff - srd.c
Makefile.am: Shorten ChangeLog target a bit.
[libsigrokdecode.git] / srd.c
diff --git a/srd.c b/srd.c
index 097ed29a5ac8368c5cd83af71849a2fe515b7168..ae1c7738b5920378bcc7d8a4ddbedeff025aca41 100644 (file)
--- a/srd.c
+++ b/srd.c
@@ -18,9 +18,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
 #include "libsigrokdecode.h"
-#include "config.h"
 #include <glib.h>
 
 /** @cond PRIVATE */
@@ -248,10 +248,7 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path)
 
        /* Convert to wide chars. */
        wc_len = sizeof(wchar_t) * (new_path->len + 1);
-       if (!(wc_new_path = g_try_malloc(wc_len))) {
-               srd_dbg("malloc failed");
-               return SRD_ERR_MALLOC;
-       }
+       wc_new_path = g_malloc(wc_len);
        mbstowcs(wc_new_path, new_path->str, wc_len);
        PySys_SetPath(wc_new_path);
        g_string_free(new_path, TRUE);