git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "add_drive_ro adds readonly=on option if available." (RHBZ#617200).
[libguestfs.git]
/
fish
/
tilde.c
diff --git
a/fish/tilde.c
b/fish/tilde.c
index
1c52d3e
..
c599e16
100644
(file)
--- a/
fish/tilde.c
+++ b/
fish/tilde.c
@@
-62,7
+62,7
@@
try_tilde_expansion (char *str)
str = malloc (len);
if (str == NULL) {
perror ("malloc");
str = malloc (len);
if (str == NULL) {
perror ("malloc");
- exit (
1
);
+ exit (
EXIT_FAILURE
);
}
strcpy (str, home);
strcat (str, rest);
}
strcpy (str, home);
strcat (str, rest);
@@
-89,7
+89,7
@@
expand_home (const char *append)
str = malloc (len);
if (str == NULL) {
perror ("malloc");
str = malloc (len);
if (str == NULL) {
perror ("malloc");
- exit (
1
);
+ exit (
EXIT_FAILURE
);
}
strcpy (str, home);
}
strcpy (str, home);
@@
-110,7
+110,7
@@
find_home_for_username (const char *username, size_t ulen)
setpwent ();
while ((pw = getpwent ()) != NULL) {
if (strlen (pw->pw_name) == ulen &&
setpwent ();
while ((pw = getpwent ()) != NULL) {
if (strlen (pw->pw_name) == ulen &&
-
strncmp (username, pw->pw_name, ulen) == 0
)
+
STREQLEN (username, pw->pw_name, ulen)
)
return pw->pw_dir;
}
return pw->pw_dir;
}