Skip to content

Commit bb22d70

Browse files
committed
Refactor variable name
1 parent 6d677f6 commit bb22d70

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Utils.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef Utils_H
22
#define Utils_H
3-
#define PATH_MAX 255
3+
#define PATH_MAX_LENGTH 255
44

55
#include "Arduino.h"
66
#include "Arduino_POSIXStorage.h"
@@ -40,11 +40,11 @@
4040
struct dirent* entry;
4141
while ((entry = readdir(dir)) != nullptr) {
4242
if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) {
43-
char sourcePath[PATH_MAX];
44-
snprintf(sourcePath, PATH_MAX, "%s/%s", source, entry->d_name);
43+
char sourcePath[PATH_MAX_LENGTH];
44+
snprintf(sourcePath, PATH_MAX_LENGTH, "%s/%s", source, entry->d_name);
4545

46-
char destinationPath[PATH_MAX];
47-
snprintf(destinationPath, PATH_MAX, "%s/%s", destination, entry->d_name);
46+
char destinationPath[PATH_MAX_LENGTH];
47+
snprintf(destinationPath, PATH_MAX_LENGTH, "%s/%s", destination, entry->d_name);
4848

4949
struct stat fileInfo;
5050
if (stat(sourcePath, &fileInfo) != 0) {

0 commit comments

Comments
 (0)