projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc4b99
)
main: fix logic bug when not specifying a timeout option
author
Jo-Philipp Wich
<
[email protected]
>
Thu, 22 Nov 2018 15:25:39 +0000
(16:25 +0100)
committer
Jo-Philipp Wich
<
[email protected]
>
Thu, 22 Nov 2018 15:25:39 +0000
(16:25 +0100)
Signed-off-by: Jo-Philipp Wich <
[email protected]
>
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index b24699765f92792824e3941d78e732aaff62b647..4ea5f2ce9eb40a3e799ec73cc34e0a5e4680e5c3 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-74,7
+74,7
@@
int main(int argc, char **argv)
break;
case 't':
- exec_timeout = strtol(optarg, NULL, 0);
+ exec_timeout =
1000 *
strtol(optarg, NULL, 0);
break;
default:
@@
-82,13
+82,11
@@
int main(int argc, char **argv)
}
}
- if (exec_timeout < 1
|| exec_timeout > 6
00) {
+ if (exec_timeout < 1
000 || exec_timeout > 6000
00) {
fprintf(stderr, "Invalid execution timeout specified\n");
return -1;
}
- exec_timeout *= 1000;
-
if (stat(RPC_UCI_DIR_PREFIX, &s))
mkdir(RPC_UCI_DIR_PREFIX, 0700);