|WARNING| cfgfile: fix isspace() undefined behavior
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Sat Oct 24 19:49:50 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/172056
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-24
# DPDK Patch Review
## ERRORS
**Missing semicolon in while loop**
Line 109: The while loop is missing a semicolon before the comment.
```c
/* Bad - syntax error */
while (isspace((unsigned char)str[start]) && start < newlen)
start++
; /* do nothing */
/* Good - semicolon on same line as increment */
while (isspace((unsigned char)str[start]) && start < newlen)
start++;
```
This would cause a compilation failure.
---
## Review Summary
The patch correctly addresses undefined behavior in the `isspace()` calls by casting char arguments to unsigned char. This is a real bug: signed char values >= 0x80 produce negative int values when promoted, causing out-of-bounds table access in ctype functions. The fix matches the established pattern already used elsewhere in DPDK.
However, the patch introduces a syntax error that would prevent compilation.
Review-Result: ERROR
More information about the test-report
mailing list