summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2007-06-26 09:11:05 +0000
committerGerrit Pape <pape@smarden.org>2007-06-26 09:11:25 +0000
commit6dd65f1fe3021ba4ddbb3e374dc24c8acbd24ddf (patch)
tree5d39f6f2471d1e8d164699523569f1769de8ff2a /src
parent4f17342b8ffdb54fdfa12a62519b7d685b7e7ccd (diff)
downloadrunit-6dd65f1fe3021ba4ddbb3e374dc24c8acbd24ddf.tar.gz
runit-6dd65f1fe3021ba4ddbb3e374dc24c8acbd24ddf.tar.xz
runit-6dd65f1fe3021ba4ddbb3e374dc24c8acbd24ddf.zip
chpst.c: add explicit braces to avoid ambiguous 'else'.
Diffstat (limited to 'src')
-rw-r--r--src/chpst.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chpst.c b/src/chpst.c
index 8f84928..1bfc8e0 100644
--- a/src/chpst.c
+++ b/src/chpst.c
@@ -64,12 +64,13 @@ unsigned int lockdelay;
 void suidgid(char *user, unsigned int ext) {
   struct uidgid ugid;
 
-  if (ext)
+  if (ext) {
     if (! uidgids_get(&ugid, user)) {
       if (*user == ':') fatalx("invalid uid/gids", user +1);
       if (errno) fatal("unable to get password/group file entry");
       fatalx("unknown user/group", user);
     }
+  }
   else
     if (! uidgid_get(&ugid, user)) {
       if (errno) fatal("unable to get password file entry");
@@ -84,12 +85,13 @@ void euidgid(char *user, unsigned int ext) {
   struct uidgid ugid;
   char bufnum[FMT_ULONG];
 
-  if (ext)
+  if (ext) {
     if (! uidgids_get(&ugid, user)) {
       if (*user == ':') fatalx("invalid uid/gids", user +1);
       if (errno) fatal("unable to get password/group file entry");
       fatalx("unknown user/group", user);
     }
+  }
   else
     if (! uidgid_get(&ugid, user)) {
       if (errno) fatal("unable to get password file entry");