diff options
author | 2015-10-28 09:51:55 +0000 | |
---|---|---|
committer | 2015-10-28 09:51:55 +0000 | |
commit | fb46cb3d45f8409388c0708ceae7c35b9816d7d2 (patch) | |
tree | 82a82e31962a2960a835e9e60a7a64ffff21728f /usr.bin/tmux/cmd-string.c | |
parent | kern.cptime is length 2 (diff) | |
download | wireguard-openbsd-fb46cb3d45f8409388c0708ceae7c35b9816d7d2.tar.xz wireguard-openbsd-fb46cb3d45f8409388c0708ceae7c35b9816d7d2.zip |
Like options, move the environ struct into environ.c.
Diffstat (limited to 'usr.bin/tmux/cmd-string.c')
-rw-r--r-- | usr.bin/tmux/cmd-string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-string.c b/usr.bin/tmux/cmd-string.c index 3c665d22f9b..2bc6e8ddcf7 100644 --- a/usr.bin/tmux/cmd-string.c +++ b/usr.bin/tmux/cmd-string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-string.c,v 1.20 2014/10/08 17:35:58 nicm Exp $ */ +/* $OpenBSD: cmd-string.c,v 1.21 2015/10/28 09:51:55 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net> @@ -126,7 +126,7 @@ cmd_string_parse(const char *s, struct cmd_list **cmdlist, const char *file, whitespace = argv[0] + strcspn(argv[0], " \t"); if (equals == NULL || equals > whitespace) break; - environ_put(&global_environ, argv[0]); + environ_put(global_environ, argv[0]); argc--; memmove(argv, argv + 1, argc * (sizeof *argv)); } @@ -303,7 +303,7 @@ cmd_string_variable(const char *s, size_t *p) buf = xrealloc(buf, len + 1); buf[len] = '\0'; - envent = environ_find(&global_environ, buf); + envent = environ_find(global_environ, buf); free(buf); if (envent == NULL) return (xstrdup("")); @@ -326,7 +326,7 @@ cmd_string_expand_tilde(const char *s, size_t *p) last = cmd_string_getc(s, p); if (last == EOF || last == '/' || last == ' '|| last == '\t') { - envent = environ_find(&global_environ, "HOME"); + envent = environ_find(global_environ, "HOME"); if (envent != NULL && *envent->value != '\0') home = envent->value; else if ((pw = getpwuid(getuid())) != NULL) |