We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcb836f commit 7e539a3Copy full SHA for 7e539a3
main.c
@@ -18,8 +18,7 @@ int main(void)
18
}
19
20
/* 安装中断信号处理函数 */
21
- if (signal(SIGINT, sigintr_handler) == SIG_ERR)
22
- {
+ if (signal(SIGINT, sigintr_handler) == SIG_ERR) {
23
fprintf(stderr, "set SIGINT handler failed.\n");
24
exit(2);
25
@@ -28,16 +27,14 @@ int main(void)
28
27
TimerId_t ids[3];
29
30
ids[0] = timer_add(2,say_hello,NULL,LOOP);
31
- if(ids[0] == ADD_FAILED)
32
+ if(ids[0] == ADD_FAILED) {
33
fprintf(stderr, "add timer failed.\n");
34
timer_destroy();
35
return 2;
36
37
38
int value = 555;
39
ids[1] = timer_add(5, print_value, &value, ONCE);
40
-
41
ids[2] = timer_add(3, print_rectangle, NULL, LOOP);
42
43
/* 删除第0个任务 */
0 commit comments