diff options
author | nicm <nicm> | 2017-03-21 19:28:03 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-03-21 19:28:03 +0000 |
commit | 04e17a7e110bb0c70bc917b340aedd94fa60891f (patch) | |
tree | 6a1cb06ae6e3ccca00c5861da44ffe5d205caaa2 | |
parent | cdaa758340d31e57144ecb7a6e5b1dec138cc693 (diff) | |
download | rtmux-04e17a7e110bb0c70bc917b340aedd94fa60891f.tar.gz rtmux-04e17a7e110bb0c70bc917b340aedd94fa60891f.tar.bz2 rtmux-04e17a7e110bb0c70bc917b340aedd94fa60891f.zip |
Use uid_t for UID not u_int.
-rw-r--r-- | tmux.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -112,18 +112,17 @@ make_label(const char *label) { char *base, resolved[PATH_MAX], *path, *s; struct stat sb; - u_int uid; + uid_t uid; int saved_errno; if (label == NULL) label = "default"; - uid = getuid(); if ((s = getenv("TMUX_TMPDIR")) != NULL && *s != '\0') xasprintf(&base, "%s/tmux-%u", s, uid); else - xasprintf(&base, "%s/tmux-%u", _PATH_TMP, uid); + xasprintf(&base, "%s/tmux-%ld", _PATH_TMP, (long)uid); if (mkdir(base, S_IRWXU) != 0 && errno != EEXIST) goto fail; |