From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z5KFG-0007g4-67 for barebox@lists.infradead.org; Wed, 17 Jun 2015 20:47:39 +0000 From: Marc Kleine-Budde Date: Wed, 17 Jun 2015 22:47:00 +0200 Message-Id: <1434574023-20556-2-git-send-email-mkl@pengutronix.de> In-Reply-To: <1434574023-20556-1-git-send-email-mkl@pengutronix.de> References: <1434574023-20556-1-git-send-email-mkl@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v3 1/4] parameter: allow setting of string parameters of zero length To: barebox@lists.infradead.org Signed-off-by: Marc Kleine-Budde --- lib/parameter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parameter.c b/lib/parameter.c index 865ad9f4316f..09559b637ee3 100644 --- a/lib/parameter.c +++ b/lib/parameter.c @@ -225,7 +225,7 @@ static int param_string_set(struct device_d *dev, struct param_d *p, const char char *value_save = *ps->value; if (!val) - return -EINVAL; + val = ""; *ps->value = xstrdup(val); -- 2.1.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox