Skip to content

Commit 50daf33

Browse files
committed
Quiet a gcc warning on AIX
1 parent 526677d commit 50daf33

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/eventlog/eventlog.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ exec_mailer(int pipein) // -V1082
281281
const struct eventlog_config *evl_conf = eventlog_getconf();
282282
char *last, *mflags, *p, *argv[MAX_MAILFLAGS + 1];
283283
const char *mpath = evl_conf->mailerpath;
284+
gid_t mailgid = evl_conf->mailgid;
284285
size_t i;
285286
const char * const root_envp[] = {
286287
"HOME=/",
@@ -326,14 +327,14 @@ exec_mailer(int pipein) // -V1082
326327
ROOT_UID);
327328
goto bad;
328329
}
329-
if (setgid(evl_conf->mailgid) != 0) {
330+
if (setgid(mailgid) != 0) {
330331
sudo_debug_printf(SUDO_DEBUG_ERROR, "unable to change gid to %u",
331-
(unsigned int)evl_conf->mailgid);
332+
(unsigned int)mailgid);
332333
goto bad;
333334
}
334-
if (setgroups(1, &evl_conf->mailgid) != 0) {
335+
if (setgroups(1, &mailgid) != 0) {
335336
sudo_debug_printf(SUDO_DEBUG_ERROR, "unable to set groups to %u",
336-
(unsigned int)evl_conf->mailgid);
337+
(unsigned int)mailgid);
337338
goto bad;
338339
}
339340
if (evl_conf->mailuid != ROOT_UID) {

0 commit comments

Comments
 (0)