From 2055a8ee197d391961136e58275da191d3e32df4 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Thu, 8 Sep 2005 21:07:43 +0000 Subject: [PATCH] 2005-09-08 Eric Blake * libc/argz/argz_insert.c (argz_insert): Don't die with EINVAL when before is NULL. --- newlib/ChangeLog | 5 +++++ newlib/libc/argz/argz_insert.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 4c6c2435aa..989355c3dc 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2005-09-08 Eric Blake + + * libc/argz/argz_insert.c (argz_insert): Don't die with EINVAL when + before is NULL. + 2005-09-08 Brian Dessent * sf_lrint.c (lrintf): Mask 'i0' correctly when extracting diff --git a/newlib/libc/argz/argz_insert.c b/newlib/libc/argz/argz_insert.c index 043a101930..8a9fb19b2b 100644 --- a/newlib/libc/argz/argz_insert.c +++ b/newlib/libc/argz/argz_insert.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved. +/* Copyright (C) 2002, 2005 by Red Hat, Incorporated. All rights reserved. * * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. @@ -20,7 +20,7 @@ _DEFUN (argz_insert, (argz, argz_len, before, entry), int len = 0; if (before == NULL) - argz_add(argz, argz_len, entry); + return argz_add(argz, argz_len, entry); if (before < *argz || before >= *argz + *argz_len) return EINVAL; -- 2.11.0