From: Tony Finch Date: Tue, 9 Aug 2022 19:26:12 +0000 (+0100) Subject: Don't add an empty path to the command line X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b33e085af52e1c9b55e66d5a2afb02b5d45ade08;p=thirdparty%2Ffreeradius-server.git Don't add an empty path to the command line This change is a small cleanup to prepapare for the next commit. No functional change except to add some debug logging. --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 161d8674abd..88c7dfb132b 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -2014,9 +2014,10 @@ static int parse_input_file_name(char const *arg, command_t *cmd) * directory, not the .la file itself. * Otherwise, we'll do odd things. */ - if (cmd->output == OUT_LIB) { + if (cmd->output == OUT_LIB && pathlen > 0) { char *tmp = lt_strdup(arg); tmp[pathlen] = '\0'; + DEBUG("Adding: %s\n", tmp); push_count_chars(cmd->arglist, tmp); } else { cmd->output = OUT_LIB;