]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audioc.c
Consult $HOME rather than calling getpwuid(),
[paraslash.git] / audioc.c
index d6c14cbcf7245a3a7db4bb3f86cf7e35efb8384b..16155d4c02a191e776a678f1ddd402935d7922b8 100644 (file)
--- a/audioc.c
+++ b/audioc.c
@@ -175,7 +175,7 @@ static int audioc_post_monitor(struct sched *s, void *context)
        ret = recv_bin_buffer(at->fd, buf, bufsize);
        PARA_DEBUG_LOG("recv: %d\n", ret);
        if (ret == 0)
-               ret = -E_AUDIOC_EOF;
+               ret = -E_EOF;
        if (ret < 0)
                goto out;
        btr_add_output(buf, ret, at->btrn);
@@ -245,10 +245,9 @@ __noreturn static void interactive_session(void)
        if (OPT_GIVEN(HISTORY_FILE))
                history_file = para_strdup(OPT_STRING_VAL(HISTORY_FILE));
        else {
-               char *home = para_homedir();
+               const char *home = get_homedir();
                history_file = make_message("%s/.paraslash/audioc.history",
                        home);
-               free(home);
        }
        ici.history_file = history_file;