|
From: Masatake Y. <ya...@re...> - 2008-08-04 11:34:38
|
Hi,
(I lost je...@gy....
Please use ya...@re... to contact with me about FOSS.)
I have a chance to read set0.
I have not had time to build it. However, I could find some lines
which will cause troubles. Could you review following patch?
2008-08-04 Masatake YAMATO <ya...@re...>
* builtin/set0.c: Fix comments.
(set0_builtin): Free $0 before overwriting.
Return SUCCESS instead of FAILURE.
Index: set0.c
===================================================================
RCS file: /cvsroot/bashdb/bash-3.1/builtin/set0.c,v
retrieving revision 1.1
diff -c -r1.1 set0.c
*** set0.c 23 May 2008 23:55:25 -0000 1.1
--- set0.c 4 Aug 2008 11:30:01 -0000
***************
*** 1,5 ****
/*
! Extends bash with a builtin function to test if a name is defined or not.
To install after compiling:
cd *this directory*
--- 1,5 ----
/*
! Set $0.
To install after compiling:
cd *this directory*
***************
*** 31,38 ****
return (EX_USAGE);
}
dollar_vars[0] = savestring(list->word->word);
! return EXECUTION_FAILURE;
}
struct builtin set0_struct = {
--- 31,41 ----
return (EX_USAGE);
}
+ if (dollar_vars[0])
+ free (dollar_vars[0]);
+
dollar_vars[0] = savestring(list->word->word);
! return EXECUTION_SUCCESS;
}
struct builtin set0_struct = {
|