mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* utilunix.c: Cast argument for GUINT_TO_POINTER to int to fix
warnings on Cygwin.
This commit is contained in:
parent
073e17a8d0
commit
129df509f9
@ -1,5 +1,8 @@
|
||||
2002-07-10 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* utilunix.c: Cast argument for GUINT_TO_POINTER to int to fix
|
||||
warnings on Cygwin.
|
||||
|
||||
* subshell.c: ioctl() doesn't set errno - don't use perror() to
|
||||
report failures. Use fprintf() instead, ignore errors from
|
||||
TIOCSWINSZ.
|
||||
|
@ -111,7 +111,7 @@ void init_groups (void)
|
||||
/* Put user's primary group first. */
|
||||
if ((grp = getgrgid (pwd->pw_gid)) != NULL) {
|
||||
g_tree_insert (current_user_gid,
|
||||
GUINT_TO_POINTER (grp->gr_gid),
|
||||
GUINT_TO_POINTER ((int) grp->gr_gid),
|
||||
g_strdup (grp->gr_name));
|
||||
}
|
||||
|
||||
@ -120,9 +120,9 @@ void init_groups (void)
|
||||
for (i = 0; grp->gr_mem[i]; i++) {
|
||||
if (!strcmp (pwd->pw_name, grp->gr_mem[i]) &&
|
||||
!g_tree_lookup (current_user_gid,
|
||||
GUINT_TO_POINTER (grp->gr_gid))) {
|
||||
GUINT_TO_POINTER ((int) grp->gr_gid))) {
|
||||
g_tree_insert (current_user_gid,
|
||||
GUINT_TO_POINTER (grp->gr_gid),
|
||||
GUINT_TO_POINTER ((int) grp->gr_gid),
|
||||
g_strdup (grp->gr_name));
|
||||
break;
|
||||
}
|
||||
@ -138,7 +138,8 @@ get_user_permissions (struct stat *buf) {
|
||||
if (buf->st_uid == current_user_uid || current_user_uid == 0)
|
||||
return 0;
|
||||
|
||||
if(current_user_gid && g_tree_lookup (current_user_gid, GUINT_TO_POINTER(buf->st_gid)))
|
||||
if (current_user_gid && g_tree_lookup (current_user_gid,
|
||||
GUINT_TO_POINTER((int) buf->st_gid)))
|
||||
return 1;
|
||||
|
||||
return 2;
|
||||
|
Loading…
Reference in New Issue
Block a user