search for: line_read

Displaying 6 results from an estimated 6 matches for "line_read".

Did you mean: file_read
2015 Jan 21
1
Re: [PATCH] fish: remove extra "prompt" checks
...again is redundant. > --- > fish/fish.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fish/fish.c b/fish/fish.c > index 8b74c7b..71db83a 100644 > --- a/fish/fish.c > +++ b/fish/fish.c > @@ -661,8 +661,8 @@ rl_gets (int prompt) > line_read = NULL; > } > > - p = prompt && ps1 ? decode_ps1 (ps1) : NULL; > - line_read = readline (prompt ? (ps1 ? p : FISH) : ""); > + p = ps1 ? decode_ps1 (ps1) : NULL; > + line_read = readline (ps1 ? p : FISH); Can be simplified further: line_read =...
2015 Jan 20
9
[PATCH] daemon: readdir: fix invalid memory access on error
If "strdup (d->d_name)" fails with "i" > 0, then both "p" and "ret->guestfs_int_dirent_list_val" are non-null pointers, but the latter is no more valid (since "p" is the new realloc'ed buffer). Hence, trying to free both will access to invalid memory. Make sure to free only one of them, "p" if not null or
2015 Jan 20
0
[PATCH] fish: remove extra "prompt" checks
....}" block, so checking for "prompt" again is redundant. --- fish/fish.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 8b74c7b..71db83a 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -661,8 +661,8 @@ rl_gets (int prompt) line_read = NULL; } - p = prompt && ps1 ? decode_ps1 (ps1) : NULL; - line_read = readline (prompt ? (ps1 ? p : FISH) : ""); + p = ps1 ? decode_ps1 (ps1) : NULL; + line_read = readline (ps1 ? p : FISH); if (ps_output) { /* GUESTFISH_OUTPUT */ CLEAN...
2014 Dec 04
1
[PATCH] fish: fix build warning when readline-devel is missing
...LL; /* GUESTFISH_PS1 */ static char *ps_output = NULL; /* GUESTFISH_OUTPUT */ -static char *ps_restore = NULL; /* GUESTFISH_RESTORE */ static char *ps_init = NULL; /* GUESTFISH_INIT */ +#endif /* HAVE_LIBREADLINE */ +static char *ps_restore = NULL; /* GUESTFISH_RESTORE */ static char *line_read = NULL; static char * @@ -698,10 +700,12 @@ script (int prompt) struct parsed_command pcmd; if (prompt) { +#ifdef HAVE_LIBREADLINE if (ps_init) { /* GUESTFISH_INIT */ CLEANUP_FREE char *pi = decode_ps1 (ps_init); printf ("%s", pi); } +#endif...
2015 Nov 22
1
Re: installation error
Never mind I was missing libreadline-dev I gues this check would be good to be added with an error to the configure script since it creates error in compilation Regards, Peter > On 22 Nov 2015, at 20:06, Keresztes Péter-Zoltán <zozo@z0z0.tk> wrote: > > Hello, > > I have got into a different issue while trying to compile the latest version of libguestfs: > > CC
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.