From: Uwe Hermann Date: Mon, 15 Apr 2013 10:27:55 +0000 (+0200) Subject: demo: Fix compiler warning, cosmetics. X-Git-Tag: dsupstream~149 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e45ad6e24ff1a3873d551f9ed08acb3ffd0d1d0d;p=libsigrok.git demo: Fix compiler warning, cosmetics. --- diff --git a/hardware/demo/demo.c b/hardware/demo/demo.c index 1bd870d8..0245e185 100644 --- a/hardware/demo/demo.c +++ b/hardware/demo/demo.c @@ -172,8 +172,8 @@ static GSList *hw_scan(GSList *options) sdi = sr_dev_inst_new(0, SR_ST_ACTIVE, DEMONAME, NULL, NULL); if (!sdi) { - sr_err("%s: sr_dev_inst_new failed", __func__); - return 0; + sr_err("Device instance creation failed."); + return NULL; } sdi->driver = di; @@ -188,8 +188,8 @@ static GSList *hw_scan(GSList *options) drvc->instances = g_slist_append(drvc->instances, sdi); if (!(devc = g_try_malloc(sizeof(struct dev_context)))) { - sr_err("%s: devc malloc failed", __func__); - return SR_ERR_MALLOC; + sr_err("Device context malloc failed."); + return NULL; } devc->sdi = sdi;