summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-01-13 15:45:28 +0100
committerTyge Løvset <[email protected]>2022-01-13 15:45:28 +0100
commit36c3ddf82fa47f2718b9782e1a7586f477c1a0db (patch)
treecf8529a89b36796a41589576662e24ca7c639fe6 /examples
parent4a421181052483cef097746fcaaa9027aaf99a7d (diff)
downloadSTC-modified-36c3ddf82fa47f2718b9782e1a7586f477c1a0db.tar.gz
STC-modified-36c3ddf82fa47f2718b9782e1a7586f477c1a0db.zip
Fix a potential compilation bug in cbox/carc.
Diffstat (limited to 'examples')
-rw-r--r--examples/list_erase.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/list_erase.c b/examples/list_erase.c
index b20f3fb1..1e5d2e9b 100644
--- a/examples/list_erase.c
+++ b/examples/list_erase.c
@@ -9,7 +9,8 @@ int main ()
c_auto (clist_int, L)
{
c_apply(i, clist_int_push_back(&L, i), int, {10, 20, 30, 40, 50});
- c_foreach (x, clist_int, L) printf("%d ", *x.ref);
+ c_foreach (x, clist_int, L)
+ printf("%d ", *x.ref);
puts("");
// 10 20 30 40 50
clist_int_iter it = clist_int_begin(&L); // ^
@@ -21,7 +22,8 @@ int main ()
it = clist_int_erase_range(&L, it, end); // 10 30
// ^
printf("list contains:");
- c_foreach (x, clist_int, L) printf(" %d", *x.ref);
+ c_foreach (x, clist_int, L)
+ printf(" %d", *x.ref);
puts("");
}
}