mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
* edit/editlock.c (lock_build_name): Check the return value of getpwuid().
* src/cmd.c (save_setup_cmd): Remove redundant g_strconcat() call. * src/hotlist.c (load_hotlist): Likewise. * vfs/smbfs.c (smbfs_convert_path): Replaced NULL with (char *) NULL.
This commit is contained in:
parent
7d113d0125
commit
b0f2d1654c
@ -1,3 +1,7 @@
|
||||
2007-11-02 Vladimir Nadvornik <nadvornik@suse.cz>
|
||||
|
||||
* editlock.c (lock_build_name): Check the return value of getpwuid().
|
||||
|
||||
2007-09-11 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* choosesyntax.c (pstrcmp): Make static.
|
||||
|
@ -69,9 +69,11 @@ static char *
|
||||
lock_build_name (void)
|
||||
{
|
||||
char host[BUF_SIZE];
|
||||
const char *user;
|
||||
const char *user = NULL;
|
||||
struct passwd *pw;
|
||||
|
||||
user = getpwuid (getuid ())->pw_name;
|
||||
pw = getpwuid (getuid ());
|
||||
if (pw) user = pw->pw_name;
|
||||
if (!user) user = getenv ("USER");
|
||||
if (!user) user = getenv ("USERNAME");
|
||||
if (!user) user = getenv ("LOGNAME");
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-11-02 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* cmd.c (save_setup_cmd): Remove redundant g_strconcat() call.
|
||||
* hotlist.c (load_hotlist): Likewise.
|
||||
|
||||
2007-10-15 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* myslang.h [HAS_ACS_AS_PCCHARS]: Remove all code ifdef-ed
|
||||
|
@ -1227,10 +1227,8 @@ save_setup_cmd (void)
|
||||
|
||||
save_setup ();
|
||||
sync_profiles ();
|
||||
str = g_strconcat ( _(" Setup saved to ~/"), PROFILE_NAME, (char *) NULL);
|
||||
|
||||
message (0, _(" Setup "), str);
|
||||
g_free (str);
|
||||
message (0, _(" Setup "), _(" Setup saved to ~/%s"), PROFILE_NAME);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1471,13 +1471,9 @@ load_hotlist (void)
|
||||
if (result) {
|
||||
remove_old_list = 1;
|
||||
} else {
|
||||
char *msg;
|
||||
|
||||
msg = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME,
|
||||
_(" file, your old hotlist entries were not deleted"), (char *) NULL);
|
||||
|
||||
message (D_ERROR, _(" Hotlist Load "), msg);
|
||||
g_free (msg);
|
||||
message (D_ERROR, _(" Hotlist Load "),
|
||||
_("MC was unable to write ~/%s file, your old hotlist entries were not deleted"),
|
||||
HOTLIST_FILENAME);
|
||||
}
|
||||
} else {
|
||||
hot_load_file (hotlist);
|
||||
|
@ -1,3 +1,7 @@
|
||||
2007-11-02 Vladimir Nadvornik <nadvornik@suse.cz>
|
||||
|
||||
* smbfs.c (smbfs_convert_path): Replaced NULL with (char *) NULL.
|
||||
|
||||
2007-10-29 Pavel Tsekov <ptsekov@gmx.net>
|
||||
|
||||
* fish.c (FISH_OP): Remove the second argument since it is unused.
|
||||
|
@ -567,7 +567,7 @@ smbfs_convert_path (const char *remote_file, gboolean trailing_asterik)
|
||||
if (p)
|
||||
my_remote = p; /* strip off share/service name */
|
||||
/* create remote filename as understood by smb clientgen */
|
||||
result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", 0);
|
||||
result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", (char *) NULL);
|
||||
unix_to_dos (result, /* inplace = */ 1); /* code page conversion */
|
||||
str_replace(result, '/', '\\');
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user