]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
client: Remove unused ->config_file member.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 14 Mar 2018 19:39:28 +0000 (20:39 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 30 Mar 2018 14:18:17 +0000 (16:18 +0200)
Currently we store a copy of the config file path in the client task
structure for no reason at all. Remove it.

client.h
client_common.c

index f8cc5d649bb682ba497212b87a7417d911c44472..7ba56b9168c500bd4f596c5ba9db82ccef3347c5 100644 (file)
--- a/client.h
+++ b/client.h
@@ -36,8 +36,6 @@ struct client_task {
        unsigned char *challenge_hash;
        /** The parsed command line (including the command). */
        struct lls_parse_result *lpr;
-       /** The config file for client options. */
-       char *config_file;
        /** The RSA private key. */
        char *key_file;
        /** Paraslash user name. */
index 261dc833c0abd82712749198e657d0accfb1804d..a8d480555708f77331cf4eb89b4b6d0df43d02c5 100644 (file)
@@ -40,7 +40,6 @@ void client_close(struct client_task *ct)
        if (!ct)
                return;
        free(ct->user);
-       free(ct->config_file);
        free(ct->key_file);
        lls_free_parse_result(ct->lpr, CLIENT_CMD_PTR);
        free(ct->challenge_hash);
@@ -595,18 +594,17 @@ int client_parse_config(int argc, char *argv[], struct client_task **ct_ptr,
        ct->scc.fd = -1;
        ct->lpr = lpr;
        ct->key_file = kf;
-       ct->config_file = cf;
        ct->user = user;
        *ct_ptr = ct;
        ret = lls_num_inputs(lpr);
 out:
        free(home);
+       free(cf);
        if (ret < 0) {
                if (errctx)
                        PARA_ERROR_LOG("%s\n", errctx);
                free(errctx);
                lls_free_parse_result(lpr, cmd);
-               free(cf);
                free(kf);
                *ct_ptr = NULL;
        }