]> git.wh0rd.org Git - nano.git/commitdiff
username_tab_completion() - Removed redundant conditional (Rocco)
authorChris Allegretta <chrisa@asty.org>
Tue, 23 Jan 2001 04:16:31 +0000 (04:16 +0000)
committerChris Allegretta <chrisa@asty.org>
Tue, 23 Jan 2001 04:16:31 +0000 (04:16 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@504 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
files.c

index 95f244af3b6c657811b3b5dea8321c79a672a9d7..0455f8b050dfd24b1c3313ea4271b9d66fc8de7d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ General
   username_tab_completion()
        - Optimization and removal of useless vars (Rocco).
        - Rewritten using getpwent (suggested by Rocco).
+       - Removed redundant conditional (Rocco).
   real_dir_from_tilde()
        - Rewritten using getpwent (suggested by Adam, much optimized by Rocco).
 - global.c:
diff --git a/files.c b/files.c
index 5c14760d42a89733af7fd3389a6679cb2d144d86..ebc9b554862db4356acbf1f4b5a316bf7df9f39e 100644 (file)
--- a/files.c
+++ b/files.c
@@ -687,9 +687,6 @@ char **username_tab_completion(char *buf, int *num_matches)
 
     while ((userdata = getpwent()) != NULL) {
 
-       if (userdata == NULL)
-           break;
-
        if (check_wildcard_match(userdata->pw_name, &buf[1]) == TRUE) {
 
            /* Cool, found a match.  Add it to the list