Skip to content

Commit c03fe0a

Browse files
committed
Fix orphographical errors in comments
1 parent ca0b119 commit c03fe0a

File tree

20 files changed

+49
-45
lines changed

20 files changed

+49
-45
lines changed

apps/examples/async/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* async_top handles user input. Press ENTER to switch between
4949
* async_regular and async_off substates.
5050
*
51-
* Generally the use of async is warranted if the sequence of
51+
* Generally the use of async is warranted, if the sequence of
5252
* steps can be represented as a flowchart like in this case.
5353
*
5454
* async_regular calls async_regular_() to do the printing

libs/ao/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,5 @@ Limitations
116116

117117
- The maximum number of active objects (``AM_AO_NUM_MAX``) is constrained to 64
118118
by design for simplicity and resource efficiency.
119-
- Pub/sub functionality requires explicit initialization if used.
119+
- Pub/sub functionality requires explicit initialization, if used.
120120

libs/ao/ao.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ bool am_ao_publish_exclude_x(
6868

6969
if (!am_event_is_static(event)) {
7070
/*
71-
* To avoid a potential race condition if higher priority
71+
* To avoid a potential race condition, if higher priority
7272
* active object preempts the event publishing and frees the event
7373
* as processed.
7474
*/

libs/ao/ao.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ bool am_ao_publish_exclude_x(
184184
* Publish \p event to all subscribed active objects except the given one.
185185
*
186186
* Same as am_ao_publish_exclude_x() except this function
187-
* crashes with assert if it fails delivering the \p event to at
187+
* crashes with assert, if it fails delivering the \p event to at
188188
* least one subscribed active object.
189189
*
190190
* @param event the event to publish
@@ -248,7 +248,7 @@ bool am_ao_publish_x(const struct am_event *event, int margin);
248248
* Publish \p event to all subscribed active objects.
249249
*
250250
* Same as am_ao_publish_x() except this function
251-
* crashes with assert if it fails delivering the \p event to at
251+
* crashes with assert, if it fails delivering the \p event to at
252252
* least one subscribed active object.
253253
*
254254
* @param event the event to publish
@@ -291,7 +291,8 @@ bool am_ao_post_fifo_x(
291291
* Post \p event to the back of active object's event queue.
292292
*
293293
* Same as am_ao_post_fifo_x() except this function
294-
* crashes with assert if it fails delivering the \p event to the active object.
294+
* crashes with assert, if it fails delivering the \p event to the active
295+
* object.
295296
*
296297
* @param ao the event is posted to this active object
297298
* @param event the event to post
@@ -331,7 +332,8 @@ bool am_ao_post_lifo_x(
331332
* Post \p event to the front of active object's event queue.
332333
*
333334
* Same as am_ao_post_lifo_x() except this function
334-
* crashes with assert if it fails delivering the \p event to the active object.
335+
* crashes with assert, if it fails delivering the \p event to the active
336+
* object.
335337
*
336338
* @param ao the event is posted to this active object
337339
* @param event the event to post
@@ -438,7 +440,7 @@ void am_ao_unsubscribe_all(const struct am_ao *ao);
438440
/**
439441
* Initialize active object global subscribe list.
440442
*
441-
* Optional. Only needed if active object pub/sub functionality is used.
443+
* Optional. Only needed, if active object pub/sub functionality is used.
442444
* The pub/sub functionality is provided by
443445
* am_ao_publish(), am_ao_publish_x(),
444446
* am_ao_publish_exclude(), am_ao_publish_exclude_x(),

libs/ao/state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct am_ao_state {
4949
struct am_ao_subscribe_list *sub;
5050
/** User defined pubsub list length. */
5151
int nsub;
52-
/** User defined active objects, or NULL if not defined. */
52+
/** User defined active objects, or NULL, if not defined. */
5353
struct am_ao *aos[AM_AO_NUM_MAX];
5454
/** Number of runnings AOs */
5555
int aos_cnt;

libs/async/async.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ struct am_async {
9494
* Await a condition before proceeding.
9595
*
9696
* Checks the provided condition `cond`.
97-
* Returns if the condition is not met (false) and
97+
* Returns, if the condition is not met (false) and
9898
* on next invocation of the function the condition is evaluated again.
9999
*
100100
* Continues the function execution once the `cond` evaluates to `true`.

libs/common/compiler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ AM_ASSERT_STATIC(LONG_MAX == ((1ULL << (unsigned)(LONG_BITS - 1)) - 1));
579579
})
580580
#endif /*AM_COMPILER_ID*/
581581

582-
/** Add integers and assert if it overflows */
582+
/** Add integers and assert, if it overflows */
583583
#define AM_ADD_INT(a, b) \
584584
AM_EXTENSION({ \
585585
int add_res_; \
@@ -589,7 +589,7 @@ AM_ASSERT_STATIC(LONG_MAX == ((1ULL << (unsigned)(LONG_BITS - 1)) - 1));
589589
add_res_; \
590590
})
591591

592-
/** Multiply integers and assert if it overflows */
592+
/** Multiply integers and assert, if it overflows */
593593
#define AM_MUL_INT(a, b) \
594594
AM_EXTENSION({ \
595595
int mul_res_; \

libs/common/macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* with an item that overloads operator[]().
4747
* The compiler will complain instead of giving a bad result.
4848
* 2. if a pointer is mistakenly passed as the argument, the compiler will
49-
* complain in some cases - specifically if the pointer's size isn't evenly
49+
* complain in some cases - specifically, if the pointer's size isn't evenly
5050
* divisible by the size of the object the pointer points to.
5151
* In that situation a divide-by-zero will cause the compiler to error out.
5252
*/

libs/crc/crc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extern "C" {
5454
* for details.
5555
*
5656
* @param data data for which the checksum is to be calculated
57-
* NULL is a valid value if size is zero.
57+
* NULL is a valid value, if size is zero.
5858
* @param size data size [bytes]
5959
* @param crc initial CRC value
6060
* Must be 0xFFFF at start or the result of previous crc16() call,
@@ -82,7 +82,7 @@ unsigned int crc16(const unsigned char *data, int size, unsigned int crc);
8282
* for details.
8383
*
8484
* @param data data for which the checksum is to be calculated
85-
* NULL is a valid value if size is zero.
85+
* NULL is a valid value, if size is zero.
8686
* @param size data array size [bytes]
8787
* @param crc initial CRC value
8888
* Must be 0x000000 at start or the result of previous crc24()
@@ -110,8 +110,8 @@ unsigned long crc24(const unsigned char *data, int size, unsigned long crc);
110110
* http://reveng.sourceforge.net/crc-catalogue/17plus.htm (CRC-32/MPEG-2)
111111
* for details.
112112
*
113-
* @param data data for which the checksum is to be calculated
114-
* NULL is a valid value if size is zero
113+
* @param data data for which the checksum is to be calculated.
114+
* NULL is a valid value, if size is zero.
115115
* @param size data array size [bytes]
116116
* @param crc initial CRC value
117117
* Must be 0xFFFFFFFF at start or the result of previous crc32()

libs/dlist/dlist.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void am_dlist_item_ctor(struct am_dlist_item *item);
132132
* @param list the list
133133
* @param item the item next to this one is returned
134134
*
135-
* @return the next item or NULL if \a item is the last one in the list
135+
* @return the next item or NULL, if \a item is the last one in the list
136136
*/
137137
struct am_dlist_item *am_dlist_next(
138138
const struct am_dlist *list, const struct am_dlist_item *item
@@ -147,7 +147,7 @@ struct am_dlist_item *am_dlist_next(
147147
* @param list the list
148148
* @param item the item previous to this one is returned
149149
*
150-
* @return the previous item or NULL if \a item is the first one in the list
150+
* @return the previous item or NULL, if \a item is the first one in the list
151151
*/
152152
struct am_dlist_item *am_dlist_prev(
153153
const struct am_dlist *list, const struct am_dlist_item *item
@@ -204,7 +204,7 @@ void am_dlist_pop(struct am_dlist_item *item);
204204
*
205205
* @param list the list
206206
*
207-
* @return the popped item or NULL if the list was empty
207+
* @return the popped item or NULL, if the list was empty
208208
*/
209209
struct am_dlist_item *am_dlist_pop_front(struct am_dlist *list);
210210

@@ -213,7 +213,7 @@ struct am_dlist_item *am_dlist_pop_front(struct am_dlist *list);
213213
*
214214
* @param list the list
215215
*
216-
* @return the popped item or NULL if the list was empty
216+
* @return the popped item or NULL, if the list was empty
217217
*/
218218
struct am_dlist_item *am_dlist_pop_back(struct am_dlist *list);
219219

@@ -224,7 +224,7 @@ struct am_dlist_item *am_dlist_pop_back(struct am_dlist *list);
224224
*
225225
* @param list the list
226226
*
227-
* @return The pointer to the front (head) item or NULL if the list is empty
227+
* @return The pointer to the front (head) item or NULL, if the list is empty
228228
*/
229229
struct am_dlist_item *am_dlist_peek_front(struct am_dlist *list);
230230

@@ -235,7 +235,7 @@ struct am_dlist_item *am_dlist_peek_front(struct am_dlist *list);
235235
*
236236
* @param list the list
237237
*
238-
* @return the pointer to the back (tail) item or NULL if the list is empty
238+
* @return the pointer to the back (tail) item or NULL, if the list is empty
239239
*/
240240
struct am_dlist_item *am_dlist_peek_back(struct am_dlist *list);
241241

@@ -300,7 +300,7 @@ void am_dlist_iterator_ctor(
300300
*
301301
* @param it the iterator constructed by am_dlist_iterator_ctor()
302302
*
303-
* @return the visited item or NULL if the iteration is over
303+
* @return the visited item or NULL, if the iteration is over
304304
* The item is not popped from the list.
305305
*/
306306
struct am_dlist_item *am_dlist_iterator_next(struct am_dlist_iterator *it);

0 commit comments

Comments
 (0)