commit: 6456f8cdc36b69558e3ae35281ce524f40e89352 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> AuthorDate: Thu Jan 22 09:48:29 2026 +0000 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> CommitDate: Thu Jan 22 09:51:44 2026 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6456f8cd
libq/xpak: remove double close of fd after _xpak_add_file _xpak_add_file closes the input descriptor via fclose() Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> libq/xpak.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libq/xpak.c b/libq/xpak.c index 5434ccc..918be76 100644 --- a/libq/xpak.c +++ b/libq/xpak.c @@ -1,5 +1,5 @@ /* - * Copyright 2005-2025 Gentoo Foundation + * Copyright 2005-2026 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd - <[email protected]> @@ -364,7 +364,7 @@ xpak_create( } _xpak_add_file(fd, path, &st, findex, &index_len, fdata, &data_len, verbose); - close(fd); + /* _xpak_add_file closes fd */ } scandir_free(dir, numfiles); } else if (S_ISREG(st.st_mode)) { @@ -375,7 +375,7 @@ xpak_create( } _xpak_add_file(fd, argv[i], &st, findex, &index_len, fdata, &data_len, verbose); - close(fd); + /* _xpak_add_file closes fd */ } else warn("Skipping non file/directory '%s'", argv[i]); }
