summaryrefslogtreecommitdiff
path: root/android/system-emulator.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-11 10:37:34 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-11 13:33:06 +0300
commitf0591385d26feb21a98d0971a8ebb2223f2ed20a (patch)
tree5d2bf70d83cf585e17009c993dc7d089d0059a1c /android/system-emulator.c
parentefad8923a292dc51d7cb8211f7b91977ffda4a33 (diff)
downloadbluez-f0591385d26feb21a98d0971a8ebb2223f2ed20a.tar.gz
android: Fix usage of PATH_MAX
PATH_MAX already contains the terminating null so there's no need to +1 to it.
Diffstat (limited to 'android/system-emulator.c')
-rw-r--r--android/system-emulator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/android/system-emulator.c b/android/system-emulator.c
index 4d41fceb1..4adc109e3 100644
--- a/android/system-emulator.c
+++ b/android/system-emulator.c
@@ -42,7 +42,7 @@
#include "monitor/mainloop.h"
-static char exec_dir[PATH_MAX + 1];
+static char exec_dir[PATH_MAX];
static pid_t daemon_pid = -1;
static pid_t snoop_pid = -1;
@@ -82,7 +82,7 @@ static void run_bluetoothd(char *prg_name)
static void ctl_start(void)
{
- char prg_name[PATH_MAX + 1];
+ char prg_name[PATH_MAX];
pid_t pid;
snprintf(prg_name, sizeof(prg_name), "%s/%s", exec_dir, "bluetoothd");
@@ -110,7 +110,7 @@ static void ctl_start(void)
static void snoop_start(void)
{
- char prg_name[PATH_MAX + 1];
+ char prg_name[PATH_MAX];
char *prg_argv[3];
char *prg_envp[1];
pid_t pid;