Skip to content

Commit c0ba6a7

Browse files
committed
Fix review finds for SIG30-C
1 parent 03f1d41 commit c0ba6a7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

c/cert/src/rules/SIG30-C/CallOnlyAsyncSafeFunctionsWithinSignalHandlers.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class ApplicationAsyncSafeFunction extends AsyncSafeFunction {
8686
}
8787

8888
/**
89-
* Call to function `raise` withing a signal handler with mismatching signals
89+
* Call to function `raise` within a signal handler with mismatching signals
9090
* ```
9191
* void int_handler(int signum) {
9292
* raise(SIGTERM);

c/cert/test/rules/SIG30-C/test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ void handler1(int signum) {
1313
}
1414

1515
int f1(void) {
16-
if (signal(SIGINT, handler1) == SIG_ERR) // COMPLIANT
16+
if (signal(SIGINT, handler1) == SIG_ERR)
1717
{
1818
//...
1919
}
2020

21-
log_local_unsafe(); // COMPLIANT
21+
log_local_unsafe();
2222

2323
return 0;
2424
}
@@ -33,7 +33,7 @@ int f2(void) {
3333
}
3434

3535
while (!eflag) {
36-
log_local_unsafe(); // COMPLIANT
36+
log_local_unsafe();
3737
}
3838

3939
return 0;
@@ -113,7 +113,7 @@ int f6(void) {
113113
// ...
114114
}
115115

116-
if (raise(SIGINT) != 0) // COMPLIANT
116+
if (raise(SIGINT) != 0)
117117
{
118118
// ...
119119
}

0 commit comments

Comments
 (0)