/[baselayout]/trunk/src/env-update.c
Gentoo

Diff of /trunk/src/env-update.c

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

Revision 2549 Revision 2550
132 132
133 if (strcmp (tmpentry, var) == 0) 133 if (strcmp (tmpentry, var) == 0)
134 { 134 {
135 if (isspecial) 135 if (isspecial)
136 { 136 {
137 int len = strlen (envs[k - 1]) + strlen (entry) + 1;
137 envs[k - 1] = rc_xrealloc (envs[k - 1], 138 envs[k - 1] = rc_xrealloc (envs[k - 1], len);
138 strlen (envs[k - 1]) +
139 strlen (entry) + 1);
140 sprintf (envs[k - 1] + strlen (envs[k - 1]), 139 snprintf (envs[k - 1] + strlen (envs[k - 1]), len,
141 "%s%s", isspecial_spaced ? " " : ":", value); 140 "%s%s", isspecial_spaced ? " " : ":", value);
142 } 141 }
143 else 142 else
144 { 143 {
145 free (envs[k - 1]); 144 free (envs[k - 1]);

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

  ViewVC Help
Powered by ViewVC 1.1.20