[gnome-commander] Removes gcc warning about uid_t which can not be less than zero
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Removes gcc warning about uid_t which can not be less than zero
- Date: Fri, 14 Apr 2017 10:13:52 +0000 (UTC)
commit 53c4592f8ead97f70a26e9805bb8935e9e28595b
Author: Uwe Scholz <uwescholz src gnome org>
Date: Fri Apr 14 11:37:33 2017 +0200
Removes gcc warning about uid_t which can not be less than zero
src/dialogs/gnome-cmd-file-props-dialog.cc | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-file-props-dialog.cc b/src/dialogs/gnome-cmd-file-props-dialog.cc
index 9898f18..5eccf00 100644
--- a/src/dialogs/gnome-cmd-file-props-dialog.cc
+++ b/src/dialogs/gnome-cmd-file-props-dialog.cc
@@ -209,15 +209,11 @@ static void on_dialog_ok (GtkButton *btn, GnomeCmdFilePropsDialogPrivate *data)
if (result == GNOME_VFS_OK)
{
+
uid_t uid = gnome_cmd_chown_component_get_owner (GNOME_CMD_CHOWN_COMPONENT (data->chown_component));
gid_t gid = gnome_cmd_chown_component_get_group (GNOME_CMD_CHOWN_COMPONENT (data->chown_component));
- if (uid == data->f->info->uid)
- uid = -1;
- if (gid == data->f->info->gid)
- gid = -1;
-
- if (uid != -1 || gid != -1)
+ if (uid != data->f->info->uid || gid != data->f->info->gid)
result = data->f->chown(uid,gid);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]