Skip to content

Commit

Permalink
use FILENAME_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
dovholuknf committed Oct 17, 2024
1 parent d253fea commit befd2b0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions programs/ziti-edge-tunnel/ziti-edge-tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "instance.h"
#include "instance-config.h"
#include <service-utils.h>
#include <limits.h>

#if __APPLE__ && __MACH__
#include "netif_driver/darwin/utun.h"
Expand Down Expand Up @@ -2057,8 +2056,8 @@ size_t find_other_zets(model_list* ipcs, const char* ipc_base, const char* ipc_p
}

static bool same_dir(const char* path1, const char* path2) {
char resolved_path1[PATH_MAX];
char resolved_path2[PATH_MAX];
char resolved_path1[FILENAME_MAX];
char resolved_path2[FILENAME_MAX];

if (realpath(path1, resolved_path1) == NULL) {
ZITI_LOG(ERROR, "error resolving path1");
Expand Down Expand Up @@ -2339,9 +2338,6 @@ static ziti_enroll_opts enroll_opts;
static char* config_file;

#if _WIN32
#ifndef PATH_MAX
#define PATH_MAX MAX_PATH
#endif
#define realpath(rel, abs) _fullpath(abs, rel, PATH_MAX)
#endif

Expand Down

0 comments on commit befd2b0

Please sign in to comment.