synk

synchronize files between hosts
Log | Files | Refs | README | LICENSE

commit a1da0e4995ec90f1913f3680543dc0f3c86c524c
parent 8b8a17a79f10982e0c838b3dff5c91aef3fe936c
Author: Willy <willyatmailoodotorg>
Date:   Fri Sep  9 08:31:47 +0200

Use _POSIX_PATH_MAX instead of PATH_MAX

Diffstat:
synk.c | 6+++---
synk.h | 2+-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/synk.c b/synk.c @@ -138,7 +138,7 @@ getmetadata(const char *fn) } memset(meta, 0, sizeof(struct metadata_t)); - snprintf(meta->path, PATH_MAX, "%s", fn); + snprintf(meta->path, _POSIX_PATH_MAX, "%s", fn); if ((f = fopen(fn, "r")) == NULL) return meta; @@ -532,7 +532,7 @@ int main(int argc, char *argv[]) { char *argv0, *fn; - char config[PATH_MAX] = PATHCONFIG; + char config[_POSIX_PATH_MAX] = PATHCONFIG; char *hostname = NULL; in_port_t port = DEFPORT; uint8_t mode = SYNK_CLIENT; @@ -542,7 +542,7 @@ main(int argc, char *argv[]) ARGBEGIN{ case 'f': - strncpy(config, EARGF(usage(argv0)), PATH_MAX); + strncpy(config, EARGF(usage(argv0)), _POSIX_PATH_MAX); break; case 'h': hostname = EARGF(usage(argv0)); diff --git a/synk.h b/synk.h @@ -19,7 +19,7 @@ struct client_t { /* metadata informations about a file, to decide about the synkro state */ struct metadata_t { - char path[PATH_MAX]; + char path[_POSIX_PATH_MAX]; unsigned char hash[64]; long mtime; };