What changed, and why it matters
This commit only fixes typos and comment style. It changes two C-style comments from // to /* */ and corrects a grammar error in a documentation comment ('element' to 'elements'). There are no code behavior changes, no bug fixes, and no security relevance.
No action required. This is a non-functional documentation/comment cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies common/utils.c and common/utils.h. In utils.c, two inline comments are rewritten from C++-style // comments to C-style / / comments with identical wording. In utils.h, a docstring is corrected from ‘Remove a range of element from an array’ to ‘Remove a range of elements from an array’. No executable logic, function signatures, memory handling, or control flow is altered.
Changed components
common/utils.ccommon/utils.hInspect captured patch +3 / −3
### common/utils.c
@@ -137,7 +137,7 @@ void clean_tmpctx(void)
void tal_arr_remove_(void *p, size_t elemsize, size_t n)
{
- // p is a pointer-to-pointer for tal_resize.
+ /* p is a pointer-to-pointer for tal_resize. */
char *objp = *(char **)p;
size_t len = tal_bytelen(objp);
assert(len % elemsize == 0);
@@ -149,7 +149,7 @@ void tal_arr_remove_(void *p, size_t elemsize, size_t n)
void tal_arr_remove_range_(void *p, size_t position, size_t chunk_size)
{
- // p is a pointer-to-pointer for tal_resize.
+ /* p is a pointer-to-pointer for tal_resize. */
char *objp = *(char **)p;
size_t len = tal_bytelen(objp);
assert(chunk_size + position <= len);
### common/utils.h
@@ -87,7 +87,7 @@ bool tal_arr_eq_(const void *a, const void *b, size_t unused);
void tal_arr_remove_(void *p, size_t elemsize, size_t n);
/**
- * Remove a range of element from an array
+ * Remove a range of elements from an array
*
* This will shift the elements past the removed elements, changing
* their position in memory, so only use this for simple arrays.Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.