Skip to content

Commit 458b8ce

Browse files
XhmikosRPKEuS
authored andcommitted
samples: separate code blocks, remove extra empty lines at the end of files
1 parent d3e990b commit 458b8ce

17 files changed

Lines changed: 2 additions & 18 deletions

File tree

samples/AssignmentAddressToInteger/bad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ int foo(int *p)
33
int a = p;
44
return a + 4;
55
}
6+
67
int main()
78
{
89
int i[10];
910
foo(i);
1011
}
11-

samples/AssignmentAddressToInteger/good.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ int* foo(int *p)
22
{
33
return p + 4;
44
}
5+
56
int main()
67
{
78
int i[10];
89
foo(i);
910
}
10-
11-

samples/arrayIndexOutOfBounds/bad.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ int main()
66
a[2] = 0;
77
return a[0];
88
}
9-

samples/arrayIndexOutOfBounds/good.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ int main()
66
a[2] = 0;
77
return a[0];
88
}
9-

samples/autoVariables/bad.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ int main()
99
int *c;
1010
foo(&c);
1111
}
12-

samples/autoVariables/good.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ int main()
1010
int *c = &b;
1111
foo(&c);
1212
}
13-

samples/bufferAccessOutOfBounds/bad.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ int main()
66
a[i] = 0;
77
return a[0];
88
}
9-

samples/bufferAccessOutOfBounds/good.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ int main()
66
a[i] = 0;
77
return a[0];
88
}
9-

samples/erase/bad.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ int main()
1212
}
1313
}
1414
}
15-

samples/erase/good.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ int main()
1414
}
1515
}
1616
}
17-

0 commit comments

Comments
 (0)