[BACK]Return to environ.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/environ.c between version 1.21 and 1.22

version 1.21, 2019/03/18 11:58:40 version 1.22, 2019/04/23 20:36:55
Line 177 
Line 177 
         struct environ_entry            *envent;          struct environ_entry            *envent;
         struct options_entry            *o;          struct options_entry            *o;
         struct options_array_item       *a;          struct options_array_item       *a;
         const char                      *value;          union options_value             *ov;
   
         o = options_get(oo, "update-environment");          o = options_get(oo, "update-environment");
         if (o == NULL)          if (o == NULL)
                 return;                  return;
         a = options_array_first(o);          a = options_array_first(o);
         while (a != NULL) {          while (a != NULL) {
                 value = options_array_item_value(a);                  ov = options_array_item_value(a);
                 if (value == NULL) {                  if (ov == NULL) {
                         a = options_array_next(a);                          a = options_array_next(a);
                         continue;                          continue;
                 }                  }
                 if ((envent = environ_find(src, value)) == NULL)                  if ((envent = environ_find(src, ov->string)) == NULL)
                         environ_clear(dst, value);                          environ_clear(dst, ov->string);
                 else                  else
                         environ_set(dst, envent->name, "%s", envent->value);                          environ_set(dst, envent->name, "%s", envent->value);
                 a = options_array_next(a);                  a = options_array_next(a);

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22