summaryrefslogtreecommitdiffstats
path: root/svm/svmdbtool.c
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-08-12 11:42:26 -0700
committerEd Warnicke <eaw@cisco.com>2016-08-12 12:07:54 -0700
commit853e720fdd74b1ffb1168c1503cd97eb5b7f8b60 (patch)
tree6179a62bebb59afa409268a88f2b6d9d9a3702ad /svm/svmdbtool.c
parentc1be59d3eb92096f7403ad5b3c3e7cbd78ba0b96 (diff)
VPP-237: indent fixes in prep for checkstyle
Ran indent *twice* Change-Id: If9c18b81983bb859cc8dc3b415c67cbf318fc618 Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'svm/svmdbtool.c')
-rw-r--r--svm/svmdbtool.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/svm/svmdbtool.c b/svm/svmdbtool.c
index 829df4e9e61..a98b22a1272 100644
--- a/svm/svmdbtool.c
+++ b/svm/svmdbtool.c
@@ -49,8 +49,8 @@ typedef struct
svmdbtool_main_t svmdbtool_main;
-static inline
-svmdb_map_args_t * map_arg_setup (char *chroot_path)
+static inline svmdb_map_args_t *
+map_arg_setup (char *chroot_path)
{
svmdbtool_main_t *sm = &svmdbtool_main;
svmdb_map_args_t *ma = &sm->map_args;
@@ -351,8 +351,8 @@ main (int argc, char **argv)
struct group _grp, *grp;
char *s, buf[128];
- svmdbtool_main.uid = geteuid();
- svmdbtool_main.gid = getegid();
+ svmdbtool_main.uid = geteuid ();
+ svmdbtool_main.gid = getegid ();
unformat_init_command_line (&input, argv);
@@ -428,45 +428,45 @@ main (int argc, char **argv)
parsed++;
}
else if (unformat (&input, "uid %d", &uid))
- svmdbtool_main.uid = uid;
+ svmdbtool_main.uid = uid;
else if (unformat (&input, "gid %d", &gid))
- svmdbtool_main.gid = gid;
+ svmdbtool_main.gid = gid;
else if (unformat (&input, "uid %s", &s))
- {
- /* lookup the username */
- pw = NULL;
- rv = getpwnam_r(s, &_pw, buf, sizeof(buf), &pw);
- if (rv < 0)
- {
- fformat (stderr, "cannot fetch username %s", s);
- exit (1);
- }
- if (pw == NULL)
- {
- fformat (stderr, "username %s does not exist", s);
- exit (1);
- }
- vec_free (s);
- svmdbtool_main.uid = pw->pw_uid;
- }
+ {
+ /* lookup the username */
+ pw = NULL;
+ rv = getpwnam_r (s, &_pw, buf, sizeof (buf), &pw);
+ if (rv < 0)
+ {
+ fformat (stderr, "cannot fetch username %s", s);
+ exit (1);
+ }
+ if (pw == NULL)
+ {
+ fformat (stderr, "username %s does not exist", s);
+ exit (1);
+ }
+ vec_free (s);
+ svmdbtool_main.uid = pw->pw_uid;
+ }
else if (unformat (&input, "gid %s", &s))
- {
- /* lookup the group name */
- grp = NULL;
- rv = getgrnam_r(s, &_grp, buf, sizeof(buf), &grp);
- if (rv != 0)
- {
- fformat (stderr, "cannot fetch group %s", s);
- exit (1);
- }
- if (grp == NULL)
- {
- fformat (stderr, "group %s does not exist", s);
- exit (1);
- }
- vec_free (s);
- svmdbtool_main.gid = grp->gr_gid;
- }
+ {
+ /* lookup the group name */
+ grp = NULL;
+ rv = getgrnam_r (s, &_grp, buf, sizeof (buf), &grp);
+ if (rv != 0)
+ {
+ fformat (stderr, "cannot fetch group %s", s);
+ exit (1);
+ }
+ if (grp == NULL)
+ {
+ fformat (stderr, "group %s does not exist", s);
+ exit (1);
+ }
+ vec_free (s);
+ svmdbtool_main.gid = grp->gr_gid;
+ }
else
{
break;