← Commit list

9693daaae

Denys Vlasenko
Denys Vlasenko
2026-02-07
SUCCESS Duration: 163s

Subject

*: use is_prefixed_with() where appropriate

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
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -Iinclude -Iinclude -o applets/usage applets/usage.c

Build Log

(log yok)

Commit Diff GitHub →

klibc-utils/resume.c+1 -1
@@ -39,7 +39,7 @@ static dev_t name_to_dev_t(const char *devname)
struct stat st;
int r;
- if (strncmp(devname, "/dev/", 5) != 0) {
+ if (!is_prefixed_with(devname, "/dev/")) {
char *cptr;
cptr = strchr(devname, ':');
networking/ntpd.c+1 -1
@@ -2395,7 +2395,7 @@ static NOINLINE void ntp_init(char **argv)
while (peers) {
char *peer = llist_pop(&peers);
key_entry_t *key_entry = NULL;
- if (strncmp(peer, "keyno:", 6) == 0) {
+ if (is_prefixed_with(peer, "keyno:")) {
char *end;
int key_id;
peer += 6;
shell/ash.c+1 -1
@@ -1149,7 +1149,7 @@ static void dbg_show_dirtymem(const char *msg)
p = buf;
for (;;) {
char *e = strchrnul(p, '\n');
- if (strncmp(p, "Private_Dirty:", 14) == 0) {
+ if (is_prefixed_with(p, "Private_Dirty:")) {
p = skip_whitespace(p + 14);
bb_error_msg("%s:%.*s", msg, (int)(e - p), p);
break;
util-linux/volume_id/get_devname.c+1 -1
@@ -110,7 +110,7 @@ uuidcache_check_device(struct recursive_state *state UNUSED_PARAM,
/* note: this check rejects links to devices, among other nodes */
if (!S_ISBLK(statbuf->st_mode)
#if ENABLE_FEATURE_VOLUMEID_UBIFS
- && !(S_ISCHR(statbuf->st_mode) && strncmp(bb_basename(device), "ubi", 3) == 0)
+ && !(S_ISCHR(statbuf->st_mode) && is_prefixed_with(bb_basename(device), "ubi"))
#endif
)
return TRUE;