Skip to content

Commit 7e4529e

Browse files
committed
s/PATH_MAX/4096
Fix issue #8 PATH_MAX is tricky, so let's just use 4096
1 parent 0249b0e commit 7e4529e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

find-themes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ process_dir(struct themes *themes, const char *path, const char *filename)
5050
}
5151
while ((entry = readdir(dp))) {
5252
if (entry->d_type == DT_DIR && entry->d_name[0] != '.') {
53-
char buf[PATH_MAX];
53+
char buf[4096];
5454
snprintf(buf, sizeof(buf), "%s/%s/%s", path, entry->d_name, filename);
5555
/* filter 'hicolor' as it is not a complete icon set */
5656
if (strstr(buf, "hicolor") != NULL) {

main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ environment_set(const char *key, const char *value)
2828
char xcur[4096] = {0};
2929
strcpy(xcur, key);
3030
strcat(xcur, "=");
31-
char filename[PATH_MAX];
32-
char bufname[PATH_MAX];
31+
char filename[4096];
32+
char bufname[4096];
3333
char *home = getenv("HOME");
3434
snprintf(filename, sizeof(filename), "%s/%s", home, ".config/labwc/environment");
3535
snprintf(bufname, sizeof(bufname), "%s/%s", home, ".config/labwc/buf");
@@ -234,7 +234,7 @@ int
234234
main(int argc, char **argv)
235235
{
236236
/* read config file */
237-
char filename[PATH_MAX];
237+
char filename[4096];
238238
char *home = getenv("HOME");
239239
snprintf(filename, sizeof(filename), "%s/%s", home, ".config/labwc/rc.xml");
240240

0 commit comments

Comments
 (0)