[Pkg-libvirt-commits] [libguestfs] 124/146: fish: remove extra "prompt" checks

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 17:01:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch master
in repository libguestfs.

commit 6c1140ff312804695fe30139c86a030dd7d0943a
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Tue Jan 20 14:35:36 2015 +0100

    fish: remove extra "prompt" checks
    
    The code is already within a "if (prompt) {...}" block, so checking for
    "prompt" again is redundant.
    
    (cherry picked from commit bff99cec4df3916f2fc33e628223cdd3df2c3829)
---
 fish/fish.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fish/fish.c b/fish/fish.c
index fa5813b..3f9db9b 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -658,8 +658,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 */
       CLEANUP_FREE char *po = decode_ps1 (ps_output);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list