From f4555325638412c9e5fc9b0925bc3fdc6e2b1d05 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 1 Jun 2008 21:04:17 +0300 Subject: [PATCH] dpkg-query: Use strpbrk instead of strcspn and strlen --- ChangeLog | 5 +++++ src/query.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 46b3549b..43a6ec91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-01 Guillem Jover + + * src/query.c (searchfiles): Use strpbrk instead of strcspn and + strlen. + 2008-06-01 Guillem Jover * src/query.c: Include . diff --git a/src/query.c b/src/query.c index 237945d1..094f48e4 100644 --- a/src/query.c +++ b/src/query.c @@ -280,7 +280,7 @@ void searchfiles(const char *const *argv) { varbufaddc(&vb,0); thisarg= vb.buf; } - if (strcspn(thisarg,"*[?\\") == strlen(thisarg)) { + if (!strpbrk(thisarg, "*[?\\")) { namenode= findnamenode(thisarg, 0); found += searchoutput(namenode); } else { -- 2.39.5