Skip to content

Commit 1a30b8d

Browse files
ihsinmejketema
andauthored
Apply suggestions from code review
Co-authored-by: Jeroen Ketema <[email protected]>
1 parent a6654fc commit 1a30b8d

File tree

1 file changed

+2
-2
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-754/semmle/tests

1 file changed

+2
-2
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-754/semmle/tests/test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int functionWork1b() {
4848

4949
int functionWork2() {
5050
int i = 0;
51-
char a[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
51+
char a[10] = "";
5252
int b = 1;
5353
int *p = &b;
5454
scanf("%i", &i); // GOOD:the error can be determined by examining the initial value.
@@ -61,7 +61,7 @@ int functionWork2_() {
6161
int i;
6262
i = 0;
6363
char a[10];
64-
a[0] = 0;
64+
a[0] = '\0';
6565
int b;
6666
b=1;
6767
int *p = &b;

0 commit comments

Comments
 (0)