← Commit list

cc222747a

Andy Shevchenko
Andy Shevchenko
2018-02-27
SUCCESS Duration: 144s

Subject

libbb: Use return value from is_prefixed_with()

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 →

libbb/skip_whitespace.c+2 -3
@@ -32,7 +32,6 @@ char* FAST_FUNC skip_non_whitespace(const char *s)
char* FAST_FUNC skip_dev_pfx(const char *tty_name)
{
- if (is_prefixed_with(tty_name, "/dev/"))
- tty_name += 5;
- return (char*)tty_name;
+ char *unprefixed = is_prefixed_with(tty_name, "/dev/");
+ return unprefixed ? unprefixed : (char*)tty_name;
}