Commit 6492a10
examples: clean up comments and remove redundant defaults loop
example-01.c:
- Fix typo: '&addr' -> '&attr' in attribute iteration comment
- Replace 'while (config != NULL)' with idiomatic 'while (list)'
- Rename variable config -> list for clarity
- Replace manual return-on-failure count check with assert()
- Remove "only used for testing" comment by using assert
example-02.c:
- Remove opening comment about attributes->current internal state;
that detail is now documented in canfigger.h
- Remove redundant upfront defaults loop; the post-parse missing-keys
loop is sufficient and is the canonical pattern
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent bfd81c8 commit 6492a10
2 files changed
Lines changed: 19 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
32 | 25 | | |
33 | 26 | | |
34 | | - | |
35 | | - | |
| 27 | + | |
36 | 28 | | |
37 | | - | |
| 29 | + | |
38 | 30 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
45 | 34 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
53 | 38 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 39 | + | |
58 | 40 | | |
59 | 41 | | |
60 | 42 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 43 | + | |
66 | 44 | | |
67 | 45 | | |
68 | | - | |
69 | | - | |
| 46 | + | |
| 47 | + | |
70 | 48 | | |
71 | 49 | | |
72 | | - | |
| 50 | + | |
73 | 51 | | |
74 | 52 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 53 | + | |
| 54 | + | |
78 | 55 | | |
79 | 56 | | |
80 | 57 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
158 | 154 | | |
159 | 155 | | |
160 | 156 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 157 | | |
166 | 158 | | |
167 | 159 | | |
| |||
0 commit comments