This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=e56be216525ad13f00e81e960c97b1454efee9ad commit e56be216525ad13f00e81e960c97b1454efee9ad Author: Guillem Jover <guil...@debian.org> AuthorDate: Wed Jul 10 22:47:00 2024 +0200 libdpkg: Check for updateslength < 0 instead of == -1 in ulist_select() Make the check more future proof against tracking other negative values, and match the recent coding style switch to check for all negative values instead of a specific -1 (although in this case this does not signal an error, but an uninitialized value. --- lib/dpkg/dbmodify.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c index 7182cdbad..cefbc9df1 100644 --- a/lib/dpkg/dbmodify.c +++ b/lib/dpkg/dbmodify.c @@ -70,7 +70,8 @@ static int ulist_select(const struct dirent *de) { if (l > IMPORTANTMAXLEN) ohshit(_("updates directory contains file '%.250s' whose name is too long " "(length=%d, max=%d)"), de->d_name, l, IMPORTANTMAXLEN); - if (updateslength == -1) updateslength= l; + if (updateslength < 0) + updateslength = l; else if (l != updateslength) ohshit(_("updates directory contains files with different length names " "(both %d and %d)"), l, updateslength); -- Dpkg.Org's dpkg