Skip to content

Commit 22643ef

Browse files
committed
use PATH_MAX for char array length instead of head coded 256
1 parent a096e5d commit 22643ef

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/gridftp_hdfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ int local_io_block_size = 0;
3131
int local_io_count = 0;
3232

3333
// global variable for username, filename and event type
34-
char gridftp_user_name[256];
35-
char gridftp_file_name[256];
34+
char gridftp_user_name[PATH_MAX];
35+
char gridftp_file_name[PATH_MAX];
3636
char gridftp_transfer_type[10];
3737

3838
static globus_mutex_t g_hdfs_mutex;

src/gridftp_hdfs_recv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#define ADVANCE_SLASHES(x) {while (x[0] == '/' && x[1] == '/') x++;}
66

77
// extern global variable "gridftp_file_name"
8-
extern char gridftp_file_name[256];
8+
extern char gridftp_file_name[PATH_MAX];
99
extern char gridftp_transfer_type[10];
1010

1111
// Forward declarations of local functions

src/gridftp_hdfs_send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "gridftp_hdfs.h"
33
#include <syslog.h>
44

5-
extern char gridftp_file_name[256];
5+
extern char gridftp_file_name[PATH_MAX];
66
extern char gridftp_transfer_type[10];
77

88
// Forward declarations of local functions

0 commit comments

Comments
 (0)