projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Inserito programma per impostare l'accounting BSD, prima documentazione
[gapil.git]
/
sources
/
AcctCtrl.c
diff --git
a/sources/AcctCtrl.c
b/sources/AcctCtrl.c
index c60f9586dc971c8c2b5dc09851c024cb5a3b1cfe..705cc7a23b86bcdbd5c9d41675e7791ec9dc2dc2 100644
(file)
--- a/
sources/AcctCtrl.c
+++ b/
sources/AcctCtrl.c
@@
-70,11
+70,15
@@
int main(int argc, char *argv[])
* Main code beginning
*
* ***********************************************************/
* Main code beginning
*
* ***********************************************************/
- if (
(argc - optind) != 1) { /* There must be remaing parameters */
- printf("
Wrong number of arguments %d\n", argc - optind
);
-
usage();
+ if (
i == -1) {
+ printf("
Specify option\n"
);
+ usage();
}
if (enable) {
}
if (enable) {
+ if ((argc - optind) != 1) { /* There must be remaing parameters */
+ printf("Wrong number of arguments %d\n", argc - optind);
+ usage();
+ }
i = acct(argv[optind]);
} else {
i = acct(NULL);
i = acct(argv[optind]);
} else {
i = acct(NULL);