summaryrefslogtreecommitdiff
path: root/src/openvpn/argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvpn/argv.c')
-rw-r--r--src/openvpn/argv.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/openvpn/argv.c b/src/openvpn/argv.c
index a71d261..cc813ed 100644
--- a/src/openvpn/argv.c
+++ b/src/openvpn/argv.c
@@ -16,9 +16,10 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING included with this
+ * distribution); if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* A printf-like function (that only recognizes a subset of standard printf
@@ -59,9 +60,7 @@ argv_reset(struct argv *a)
{
size_t i;
for (i = 0; i < a->argc; ++i)
- {
free(a->argv[i]);
- }
free(a->argv);
argv_init(a);
}
@@ -75,9 +74,7 @@ argv_extend(struct argv *a, const size_t newcap)
size_t i;
ALLOC_ARRAY_CLEAR(newargv, char *, newcap);
for (i = 0; i < a->argc; ++i)
- {
newargv[i] = a->argv[i];
- }
free(a->argv);
a->argv = newargv;
a->capacity = newcap;
@@ -107,15 +104,11 @@ argv_clone(const struct argv *a, const size_t headroom)
argv_init(&r);
for (i = 0; i < headroom; ++i)
- {
argv_append(&r, NULL);
- }
if (a)
{
for (i = 0; i < a->argc; ++i)
- {
argv_append(&r, string_alloc(a->argv[i], NULL));
- }
}
return r;
}
@@ -339,9 +332,7 @@ argv_parse_cmd(struct argv *a, const char *s)
{
int i;
for (i = 0; i < nparms; ++i)
- {
argv_append(a, string_alloc(parms[i], NULL));
- }
}
else
{