From 9693daaaef1b996d0efc5338cf3707bb6205fee9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 7 Feb 2026 01:10:55 +0100 Subject: *: use is_prefixed_with() where appropriate function old new delta resume_main 560 556 -4 uuidcache_check_device 107 101 -6 ntp_init 1005 997 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-18) Total: -18 bytes Signed-off-by: Denys Vlasenko --- util-linux/volume_id/get_devname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util-linux') diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c index 39155f256..52bb8e03a 100644 --- a/util-linux/volume_id/get_devname.c +++ b/util-linux/volume_id/get_devname.c @@ -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; -- cgit v1.2.3-55-g6feb