diff options
| author | Quentin Young <qlyoung@nvidia.com> | 2020-09-02 15:05:43 -0400 | 
|---|---|---|
| committer | Quentin Young <qlyoung@nvidia.com> | 2020-09-02 16:54:38 -0400 | 
| commit | e117b7c528017eb5ce3b2adb715930148e8fde95 (patch) | |
| tree | 17596baf9c854a547cf8c36ee190734c0cba70de /lib/privs.c | |
| parent | 2e5b029865137c1aa383454d3552487a2b998ee4 (diff) | |
lib: explicitly cast -1 to uid_t
We should be explicit about what's happening here
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'lib/privs.c')
| -rw-r--r-- | lib/privs.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/privs.c b/lib/privs.c index 5c7e1240e2..dc43b7279d 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -1020,11 +1020,11 @@ void zprivs_get_ids(struct zprivs_ids_t *ids)  	ids->uid_priv = getuid();  	(zprivs_state.zuid) ? (ids->uid_normal = zprivs_state.zuid) -			    : (ids->uid_normal = -1); +			    : (ids->uid_normal = (uid_t)-1);  	(zprivs_state.zgid) ? (ids->gid_normal = zprivs_state.zgid) -			    : (ids->gid_normal = -1); +			    : (ids->gid_normal = (uid_t)-1);  	(zprivs_state.vtygrp) ? (ids->gid_vty = zprivs_state.vtygrp) -			      : (ids->gid_vty = -1); +			      : (ids->gid_vty = (uid_t)-1);  	return;  }  | 
