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

Diff for /src/usr.bin/tmux/options.c between version 1.7 and 1.8

version 1.7, 2012/01/21 11:12:13 version 1.8, 2012/07/10 11:53:01
Line 19 
Line 19 
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <stdarg.h>  #include <stdarg.h>
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
 #include "tmux.h"  #include "tmux.h"
Line 51 
Line 52 
         while (!RB_EMPTY(&oo->tree)) {          while (!RB_EMPTY(&oo->tree)) {
                 o = RB_ROOT(&oo->tree);                  o = RB_ROOT(&oo->tree);
                 RB_REMOVE(options_tree, &oo->tree, o);                  RB_REMOVE(options_tree, &oo->tree, o);
                 xfree(o->name);                  free(o->name);
                 if (o->type == OPTIONS_STRING)                  if (o->type == OPTIONS_STRING)
                         xfree(o->str);                          free(o->str);
                 xfree(o);                  free(o);
         }          }
 }  }
   
Line 92 
Line 93 
                 return;                  return;
   
         RB_REMOVE(options_tree, &oo->tree, o);          RB_REMOVE(options_tree, &oo->tree, o);
         xfree(o->name);          free(o->name);
         if (o->type == OPTIONS_STRING)          if (o->type == OPTIONS_STRING)
                 xfree(o->str);                  free(o->str);
         xfree(o);          free(o);
 }  }
   
 struct options_entry *printflike3  struct options_entry *printflike3
Line 109 
Line 110 
                 o->name = xstrdup(name);                  o->name = xstrdup(name);
                 RB_INSERT(options_tree, &oo->tree, o);                  RB_INSERT(options_tree, &oo->tree, o);
         } else if (o->type == OPTIONS_STRING)          } else if (o->type == OPTIONS_STRING)
                 xfree(o->str);                  free(o->str);
   
         va_start(ap, fmt);          va_start(ap, fmt);
         o->type = OPTIONS_STRING;          o->type = OPTIONS_STRING;
Line 140 
Line 141 
                 o->name = xstrdup(name);                  o->name = xstrdup(name);
                 RB_INSERT(options_tree, &oo->tree, o);                  RB_INSERT(options_tree, &oo->tree, o);
         } else if (o->type == OPTIONS_STRING)          } else if (o->type == OPTIONS_STRING)
                 xfree(o->str);                  free(o->str);
   
         o->type = OPTIONS_NUMBER;          o->type = OPTIONS_NUMBER;
         o->num = value;          o->num = value;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8