From 31bda5000136d77f516cf2080257835fb44deaef Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 20 Mar 2012 17:05:11 +0100 Subject: * apt-pkg/acquire-worker.cc: - check return of write() as gcc recommends * apt-pkg/acquire.cc: - check return of write() as gcc recommends * apt-pkg/cdrom.cc: - check return of chdir() and link() as gcc recommends * apt-pkg/clean.cc: - check return of chdir() as gcc recommends * apt-pkg/contrib/netrc.cc: - check return of asprintf() as gcc recommends --- apt-pkg/contrib/netrc.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apt-pkg/contrib/netrc.cc') diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc index cb7d36088..56e59d84b 100644 --- a/apt-pkg/contrib/netrc.cc +++ b/apt-pkg/contrib/netrc.cc @@ -68,8 +68,7 @@ int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL) if (!home) return -1; - asprintf (&netrcfile, "%s%s%s", home, DIR_CHAR, NETRC); - if(!netrcfile) + if (asprintf (&netrcfile, "%s%s%s", home, DIR_CHAR, NETRC) == -1 || netrcfile == NULL) return -1; else netrc_alloc = true; -- cgit v1.2.3