diff mbox

[pacman-dev] avoid printing NULL string

Message ID 20171216174111.4641-1-andrew.gregory.8@gmail.com
State Accepted, archived
Headers show

Commit Message

Andrew Gregory Dec. 16, 2017, 5:41 p.m. UTC
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
---
 lib/libalpm/be_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Allan McRae Jan. 6, 2018, 2:56 a.m. UTC | #1
On 17/12/17 03:41, Andrew Gregory wrote:
> Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
> ---
>  lib/libalpm/be_sync.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
> index 06f509a6..1b7c8b6f 100644
> --- a/lib/libalpm/be_sync.c
> +++ b/lib/libalpm/be_sync.c
> @@ -626,9 +626,9 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
>  	if(filename == NULL) {
>  		/* A file exists outside of a subdirectory. This isn't a read error, so return
>  		 * success and try to continue on. */
>  		_alpm_log(db->handle, ALPM_LOG_WARNING, _("unknown database file: %s\n"),
> -				filename);
> +				entryname);

Thanks,
A
diff mbox

Patch

diff --git a/lib/libalpm/be_sync.c b/lib/libalpm/be_sync.c
index 06f509a6..1b7c8b6f 100644
--- a/lib/libalpm/be_sync.c
+++ b/lib/libalpm/be_sync.c
@@ -626,9 +626,9 @@  static int sync_db_read(alpm_db_t *db, struct archive *archive,
 	if(filename == NULL) {
 		/* A file exists outside of a subdirectory. This isn't a read error, so return
 		 * success and try to continue on. */
 		_alpm_log(db->handle, ALPM_LOG_WARNING, _("unknown database file: %s\n"),
-				filename);
+				entryname);
 		return 0;
 	}
 
 	if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0