]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't add an empty path to the command line
authorTony Finch <dot@dotat.at>
Tue, 9 Aug 2022 19:26:12 +0000 (20:26 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 15 Aug 2022 19:50:24 +0000 (15:50 -0400)
This change is a small cleanup to prepapare for the next commit.
No functional change except to add some debug logging.

scripts/jlibtool.c

index 161d8674abd808ed923e08ab5d5419a5f4b0a681..88c7dfb132bf676827eed85243203b08efcecffc 100644 (file)
@@ -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;