diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-06-19 22:42:30 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-06-19 22:42:30 +0000 |
commit | 86c00b230b2edb5f31c3feff302c91fb0000bf26 (patch) | |
tree | 5ef86a945bb5ac53b3fcf29334cfaa7539d48fe5 /usr.bin/tcfs/tcfsrmgroup.c | |
parent | 1abef89558453935167b734f3edda32d8a73ab1a (diff) |
KNF
Diffstat (limited to 'usr.bin/tcfs/tcfsrmgroup.c')
-rw-r--r-- | usr.bin/tcfs/tcfsrmgroup.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/usr.bin/tcfs/tcfsrmgroup.c b/usr.bin/tcfs/tcfsrmgroup.c index 39842ee83c3..d00ca8f2f9d 100644 --- a/usr.bin/tcfs/tcfsrmgroup.c +++ b/usr.bin/tcfs/tcfsrmgroup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcfsrmgroup.c,v 1.5 2000/06/19 20:54:12 fgsch Exp $ */ +/* $OpenBSD: tcfsrmgroup.c,v 1.6 2000/06/19 22:42:29 aaron Exp $ */ /* * Transparent Cryptographic File System (TCFS) for NetBSD @@ -28,7 +28,7 @@ Remove a TCFS group from the TCFS group database. -v Makes the output a little more verbose\n"; int -rmgroup_main (int argn, char *argv[]) +rmgroup_main(int argn, char *argv[]) { int val; gid_t gid; @@ -44,27 +44,27 @@ rmgroup_main (int argn, char *argv[]) if (!gid && optarg[0] != '0') { /* group name given */ struct group *group_id; - group_id=getgrnam(optarg); + group_id = getgrnam(optarg); if (!group_id) - tcfs_error (ER_CUSTOM, "Nonexistent group."); - gid=group_id->gr_gid; + tcfs_error(ER_CUSTOM, "Nonexistent group."); + gid = group_id->gr_gid; } - have_gid=TRUE; + have_gid = TRUE; break; case 'h': - show_usage (rmgroup_usage, argv[0]); - exit (OK); + show_usage(rmgroup_usage, argv[0]); + exit(OK); case 'v': - be_verbose=TRUE; + be_verbose = TRUE; break; default: - fprintf (stderr, "Try %s --help for more informations.\n", argv[0]); - exit (ER_UNKOPT); + fprintf(stderr, "Try %s --help for more informations.\n", argv[0]); + exit(ER_UNKOPT); } - if (argn-optind) - tcfs_error (ER_UNKOPT, NULL); + if (argn - optind) + tcfs_error(ER_UNKOPT, NULL); if (!have_gid) { char *buff = NULL; @@ -72,29 +72,29 @@ rmgroup_main (int argn, char *argv[]) buff = (char*)calloc(2048, sizeof(char)); if (!buff) - tcfs_error (ER_MEM, NULL); + tcfs_error(ER_MEM, NULL); - printf ("Group id of the TCFS group to remove from the database: "); - fgets (buff,2048,stdin); + printf("Group id of the TCFS group to remove from the database: "); + fgets(buff, 2048, stdin); len = strlen(buff) - 1; buff[len] = buff[len] == '\n' ? 0 : buff[len]; - gid=(gid_t)atoi(buff); + gid = (gid_t)atoi(buff); if (!gid && optarg[0] != '0') { /* group name given */ struct group *group_id; group_id = getgrnam(optarg); if (!group_id) - tcfs_error (ER_CUSTOM, "Nonexistent group."); - gid=group_id->gr_gid; + tcfs_error(ER_CUSTOM, "Nonexistent group."); + gid = group_id->gr_gid; } - if (gid <=0 ) - tcfs_error (ER_CUSTOM, "A positive ID please!"); + if (gid <= 0) + tcfs_error(ER_CUSTOM, "A positive ID please!"); - free (buff); + free(buff); } - if (!tcfs_rmgroup (gid)) - tcfs_error (ER_CUSTOM, "Wrong ID or an error as occurred.\n"); + if (!tcfs_rmgroup(gid)) + tcfs_error(ER_CUSTOM, "Wrong ID or an error as occurred.\n"); } |