From ca57057f598bfc7119f79f71bf38ec88244ab396 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Wed, 31 Aug 2016 00:08:49 +0000 Subject: Import am-utils 6.2, Suggested by: pfg@ Obtained from: ftp://ftp.am-utils.org/pub/am-utils/ --- amd/amfs_link.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'amd/amfs_link.c') diff --git a/amd/amfs_link.c b/amd/amfs_link.c index e75ab862f8bc..0751dd7047a0 100644 --- a/amd/amfs_link.c +++ b/amd/amfs_link.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2006 Erez Zadok + * Copyright (c) 1997-2014 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -16,11 +16,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgment: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -109,13 +105,13 @@ amfs_link_match(am_opts *fo) */ if (fo->opt_fs[0] == '/') { char *link_hack = str3cat(NULL, ".", fo->opt_fs, ""); - if (!fo->opt_sublink) - fo->opt_sublink = strdup(fo->opt_fs); + if (fo->opt_sublink == NULL || fo->opt_sublink[0] == '\0') + fo->opt_sublink = xstrdup(fo->opt_fs); XFREE(fo->opt_fs); fo->opt_fs = link_hack; } - return strdup(fo->opt_fs); + return xstrdup(fo->opt_fs); } -- cgit v1.2.3