which/which-2.14-broken.patch
cvsdist 6b63f8b659 auto-import changelog data from which-2.14-5.src.rpm
Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
Tue Dec 10 2002 Than Ngo <than@redhat.com> 2.14-4
- cleanup code (bug #78478)
Thu Nov 14 2002 Tim Powers <timp@redhat.com> 2.14-3
- redirect info dir warnings to /dev/null
Thu Nov 07 2002 Than Ngo <than@redhat.com> 2.14-1
- add missing info file
2004-09-09 14:19:12 +00:00

34 lines
969 B
Diff

--- which-2.14/tilde/tilde.c.orig Mon Dec 9 18:52:19 2002
+++ which-2.14/tilde/tilde.c Mon Dec 9 18:58:09 2002
@@ -182,7 +182,10 @@
int result_size, result_index;
result_index = result_size = 0;
- if (result = strchr (string, '~'))
+
+ result = strchr (string, '~');
+
+ if (!result)
result = xmalloc (result_size = (strlen (string) + 16));
else
result = xmalloc (result_size = (strlen (string) + 1));
--- which-2.14/which.c.orig Mon Dec 9 18:58:28 2002
+++ which-2.14/which.c Mon Dec 9 18:59:52 2002
@@ -22,6 +22,7 @@
#include "getopt.h"
#include "tilde/tilde.h"
#include "bash.h"
+#include <ctype.h>
static const char *progname;
@@ -536,7 +537,7 @@
while (fgets(buf, sizeof(buf), stdin))
{
int looks_like_function_start = 0;
- int function_start_version_205b;
+ int function_start_version_205b = 0;
if (read_functions)
{
// bash version 2.0.5a and older output a pattern for `str' like