/[baselayout]/trunk/src/librc-strlist.c
Gentoo

Diff of /trunk/src/librc-strlist.c

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

Revision 2549 Revision 2550
47 while (list && list[i]) 47 while (list && list[i])
48 i++; 48 i++;
49 49
50 newlist = rc_xrealloc (list, sizeof (char *) * (i + 2)); 50 newlist = rc_xrealloc (list, sizeof (char *) * (i + 2));
51 51
52 if (i == 0) 52 if (! i)
53 newlist[i] = NULL; 53 newlist[i] = NULL;
54 newlist[i + 1] = NULL; 54 newlist[i + 1] = NULL;
55 55
56 i = 0; 56 i = 0;
57 while (newlist[i] && sortfunc (newlist[i], item) < 0) 57 while (newlist[i] && sortfunc (newlist[i], item) < 0)
86 86
87 if (!list || ! item) 87 if (!list || ! item)
88 return (list); 88 return (list);
89 89
90 while (list[i]) 90 while (list[i])
91 if (strcmp (list[i], item) == 0) 91 if (! strcmp (list[i], item))
92 { 92 {
93 free (list[i]); 93 free (list[i]);
94 do 94 do
95 { 95 {
96 list[i] = list[i + 1]; 96 list[i] = list[i + 1];

Legend:
Removed from v.2549  
changed lines
  Added in v.2550

  ViewVC Help
Powered by ViewVC 1.1.20