commit: e03e19a70d0db4b9702ba9e50f80f49f1fb2495f Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Mon Jan 26 18:22:00 2026 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Mon Jan 26 18:22:00 2026 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=e03e19a7
libq/file_magic: explicitly ignore lseek return value, CID 557226 Nothing we can do with a failing seek here, trust it will be encountered and handled upstream. Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/file_magic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libq/file_magic.c b/libq/file_magic.c index 0bffbe02..3a0182e4 100644 --- a/libq/file_magic.c +++ b/libq/file_magic.c @@ -1,5 +1,5 @@ /* - * Copyright 2025 Gentoo Foundation + * Copyright 2025-2026 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2025- Fabian Groffen - <[email protected]> @@ -103,6 +103,8 @@ file_magic_type file_magic_guess_fd ret = FMAGIC_LZO; } - lseek(fd, SEEK_CUR, (off_t)-mlen); + /* try to rewind, if this fails, what can we do? we still have found + * what it should be... */ + (void)lseek(fd, SEEK_CUR, (off_t)-mlen); return ret; }
