From 5ac6bd8834377bf72b5323be7e1ebac0765a275a Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Fri, 22 Feb 2013 12:06:21 +1030 Subject: [PATCH] Fix compile error on Linux --- commandline.c | 6 +++--- overlay_mdp.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/commandline.c b/commandline.c index 689d7735..698bf278 100644 --- a/commandline.c +++ b/commandline.c @@ -714,9 +714,9 @@ int app_server_start(const struct cli_parsed *parsed, void *context) #endif if ((tmp = malloc(PATH_MAX)) == NULL) RETURN(WHY("Out of memory")); - if (get_self_executable_path(tmp, PATH_MAX) == -1) - RETURN(WHY("unable to determine own executable name")); - execpath = tmp; + if (get_self_executable_path(tmp, PATH_MAX) == -1) + RETURN(WHY("unable to determine own executable name")); + execpath = tmp; } /* Create the instance directory if it does not yet exist */ if (create_serval_instance_dir() == -1) diff --git a/overlay_mdp.c b/overlay_mdp.c index f04a8c29..17a79238 100644 --- a/overlay_mdp.c +++ b/overlay_mdp.c @@ -88,7 +88,7 @@ int overlay_mdp_setup_sockets() } #endif if (mdp_named.poll.fd<=0) { - if (!form_serval_instance_path(&name.sun_path[0], PATH_MAX, "mdp.socket")) + if (!form_serval_instance_path(&name.sun_path[0], sizeof name.sun_path, "mdp.socket")) return WHY("Cannot construct name of unix domain socket."); unlink(&name.sun_path[0]); len = 0+strlen(&name.sun_path[0]) + sizeof(name.sun_family)+1;