diff options
author | Jim Meyering <meyering@redhat.com> | 2009-08-21 14:50:23 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-08-21 15:24:25 +0200 |
commit | 05fd2a60466cb7c270b60e9b93c46548acf319cd (patch) | |
tree | db2f218a8a91b3881cfb3d2c7f3b1ca7b33210bc /fish | |
parent | 2d80a11d189e4785a9804c87588dfabd1d593007 (diff) | |
download | libguestfs-05fd2a60466cb7c270b60e9b93c46548acf319cd.tar.gz libguestfs-05fd2a60466cb7c270b60e9b93c46548acf319cd.tar.xz libguestfs-05fd2a60466cb7c270b60e9b93c46548acf319cd.zip |
tilde.c: avoid a warning
* fish/tilde.c (find_home_for_username): Change param type: s/int/size_t/
(try_tilde_expansion): Adjust caller.
Diffstat (limited to 'fish')
-rw-r--r-- | fish/tilde.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fish/tilde.c b/fish/tilde.c index f0a22590..40854178 100644 --- a/fish/tilde.c +++ b/fish/tilde.c @@ -30,7 +30,7 @@ #include "fish.h" static char *expand_home (const char *); -static const char *find_home_for_username (const char *, int); +static const char *find_home_for_username (const char *, size_t); /* This is called from the script loop if we find a candidate for * ~username (tilde-expansion). @@ -52,10 +52,8 @@ try_tilde_expansion (char *str) * username from the password file. */ else { - int len; const char *home, *rest; - - len = strcspn (&str[1], "/"); + size_t len = strcspn (&str[1], "/"); rest = &str[1+len]; home = find_home_for_username (&str[1], len); @@ -106,7 +104,7 @@ expand_home (const char *append) * or NULL if not found. */ static const char * -find_home_for_username (const char *username, int ulen) +find_home_for_username (const char *username, size_t ulen) { struct passwd *pw; |