summaryrefslogtreecommitdiff
path: root/src/bin/exactness/recorder.c
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2020-03-03 17:36:15 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2020-03-12 16:41:05 +0100
commit525113650d7551f57d1b7e2006fbb071232b0f5f (patch)
tree073b90f8cab35b2b744478b9f6529172fb8b104f /src/bin/exactness/recorder.c
parentf8299e054234d73ba27b0bf7a6a07120279c92f1 (diff)
exactness: hamonize use of PATH_MAX as maximal path length allowed
There have been to many different defines for this in exactness. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11457
Diffstat (limited to '')
-rw-r--r--src/bin/exactness/recorder.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/exactness/recorder.c b/src/bin/exactness/recorder.c
index 812ef737e7..f8eefe591e 100644
--- a/src/bin/exactness/recorder.c
+++ b/src/bin/exactness/recorder.c
@@ -25,7 +25,6 @@
25#include <exactness_private.h> 25#include <exactness_private.h>
26#include "common.h" 26#include "common.h"
27 27
28#define MAX_PATH 1024
29#define STABILIZE_KEY_STR "F1" 28#define STABILIZE_KEY_STR "F1"
30#define SHOT_KEY_STR "F2" 29#define SHOT_KEY_STR "F2"
31#define SAVE_KEY_STR "F3" 30#define SAVE_KEY_STR "F3"
@@ -293,7 +292,7 @@ _prg_invoke(const char *full_path, int argc, char **argv)
293static Eina_Stringshare * 292static Eina_Stringshare *
294_prg_full_path_guess(const char *prg) 293_prg_full_path_guess(const char *prg)
295{ 294{
296 char full_path[MAX_PATH]; 295 char full_path[PATH_MAX];
297 if (strchr(prg, '/')) return eina_stringshare_add(prg); 296 if (strchr(prg, '/')) return eina_stringshare_add(prg);
298 char *env_path = eina_strdup(getenv("PATH")); 297 char *env_path = eina_strdup(getenv("PATH"));
299 Eina_Stringshare *ret = NULL; 298 Eina_Stringshare *ret = NULL;
@@ -483,7 +482,7 @@ int main(int argc, char **argv)
483 /* Replace the current command line to hide the Exactness part */ 482 /* Replace the current command line to hide the Exactness part */
484 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args]; 483 int len = argv[argc - 1] + strlen(argv[argc - 1]) - argv[opt_args];
485 memcpy(argv[0], argv[opt_args], len); 484 memcpy(argv[0], argv[opt_args], len);
486 memset(argv[0] + len, 0, MAX_PATH - len); 485 memset(argv[0] + len, 0, PATH_MAX - len);
487 486
488 int i; 487 int i;
489 for (i = opt_args; i < argc; i++) 488 for (i = opt_args; i < argc; i++)