/[pspp]/pspp/src/get.c
ViewVC logotype

Diff of /pspp/src/get.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by blp, Mon Oct 24 02:51:32 2005 UTC revision 1.40 by blp, Wed Oct 26 05:06:14 2005 UTC
# Line 681  keep_variables (struct dictionary *dict) Line 681  keep_variables (struct dictionary *dict)
681    dict_reorder_vars (dict, v, nv);    dict_reorder_vars (dict, v, nv);
682                        
683    /* Delete the remaining variables. */    /* Delete the remaining variables. */
684    v = xrealloc (v, (dict_get_var_cnt (dict) - nv) * sizeof *v);    v = xnrealloc (v, dict_get_var_cnt (dict) - nv, sizeof *v);
685    for (i = nv; i < dict_get_var_cnt (dict); i++)    for (i = nv; i < dict_get_var_cnt (dict); i++)
686      v[i - nv] = dict_get_var (dict, i);      v[i - nv] = dict_get_var (dict, i);
687    dict_delete_vars (dict, v, dict_get_var_cnt (dict) - nv);    dict_delete_vars (dict, v, dict_get_var_cnt (dict) - nv);
# Line 921  cmd_match_files (void) Line 921  cmd_match_files (void)
921              {              {
922                size_t i;                size_t i;
923                        
924                iter->by = xmalloc (sizeof *iter->by * mtf.by_cnt);                iter->by = xnmalloc (mtf.by_cnt, sizeof *iter->by);
925    
926                for (i = 0; i < mtf.by_cnt; i++)                for (i = 0; i < mtf.by_cnt; i++)
927                  {                  {
# Line 1714  finish_case_map (struct dictionary *d) Line 1714  finish_case_map (struct dictionary *d)
1714    
1715    map = xmalloc (sizeof *map);    map = xmalloc (sizeof *map);
1716    map->value_cnt = dict_get_next_value_idx (d);    map->value_cnt = dict_get_next_value_idx (d);
1717    map->map = xmalloc (sizeof *map->map * map->value_cnt);    map->map = xnmalloc (map->value_cnt, sizeof *map->map);
1718    for (i = 0; i < map->value_cnt; i++)    for (i = 0; i < map->value_cnt; i++)
1719      map->map[i] = -1;      map->map[i] = -1;
1720    

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26