← Commit list

43b9235f6

Samuel Mendoza-Jonas
Samuel Mendoza-Jonas
2018-05-14
SUCCESS Duration: 144s

Subject

udhcp: fix use of trim() in udhcp_str2optset()

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/udhcp/common.c+4 -3
@@ -489,9 +489,10 @@ int FAST_FUNC udhcp_str2optset(const char *const_str, void *arg, const struct dh
int length;
char *val;
- if (optflag->flags == OPTION_BIN)
- val = trim(strtok(NULL, "")); /* do not split "'q w e'" */
- else
+ if (optflag->flags == OPTION_BIN) {
+ val = strtok(NULL, ""); /* do not split "'q w e'" */
+ trim(val);
+ } else
val = strtok(NULL, ", \t");
if (!val)
break;