Fix pasteuri()
[surf.git] / surf.c
diff --git a/surf.c b/surf.c
index d43535d..5c9520f 100644 (file)
--- a/surf.c
+++ b/surf.c
@@ -259,7 +259,8 @@ sigchld(int unused)
 {
        if (signal(SIGCHLD, sigchld) == SIG_ERR)
                die("Can't install SIGCHLD handler");
-       while (0 < waitpid(-1, NULL, WNOHANG));
+       while (waitpid(-1, NULL, WNOHANG) > 0)
+               ;
 }
 
 char *
@@ -1219,7 +1220,7 @@ void
 pasteuri(GtkClipboard *clipboard, const char *text, gpointer d)
 {
        Arg a = {.v = text };
-       if (!text)
+       if (text)
                loaduri((Client *) d, &a);
 }