diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-06-27 13:56:16 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-06-27 13:56:16 +0200 |
commit | 749384a154025e268b53cf3cc79eaeddde2b3ceb (patch) | |
tree | 27baa9e6aec76635d750405d90cd461440a656d1 /src/openvpn/argv.c | |
parent | db4f04c584f7d4e828b5d317cf40962b9d854ac5 (diff) |
initial stretch branch release 2.4.0-6
Diffstat (limited to 'src/openvpn/argv.c')
-rw-r--r-- | src/openvpn/argv.c | 17 |
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 { |