summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1998-12-21 17:21:31 +0000
committerMatt Wilson <msw@src.gnome.org>1998-12-21 17:21:31 +0000
commit7b3a30ec20e175f9751d08c80e46f62969fb3f1e (patch)
tree165b15d54e6e98e8de4ef581d4abd2e4e9115857 /support
parent2ae2fbdbff3dbd6df7a0d1e3698bfa97c141d21f (diff)
downloadshared-mime-info-7b3a30ec20e175f9751d08c80e46f62969fb3f1e.tar.gz
fix pointer assignment
1998-12-21 Matt Wilson <msw@redhat.com> * poptparse.c: fix pointer assignment svn path=/trunk/; revision=540
Diffstat (limited to 'support')
-rw-r--r--support/ChangeLog4
-rw-r--r--support/poptparse.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/support/ChangeLog b/support/ChangeLog
index 8bef4ede..bf069249 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,7 @@
+1998-12-21 Matt Wilson <msw@redhat.com>
+
+ * poptparse.c: fix pointer assignment
+
1998-12-16 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* Makefile.am (libgnomesupport_la_SOURCES): added gnome-argp.c,
diff --git a/support/poptparse.c b/support/poptparse.c
index 35eaa436..2e9bc738 100644
--- a/support/poptparse.c
+++ b/support/poptparse.c
@@ -16,7 +16,7 @@
#include "popt-gnome.h"
int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
- char * buf;
+ char * buf = strcpy(alloca(strlen(s) + 1), s);
char * bufStart = buf;
char * src, * dst;
char quote = '\0';
@@ -26,7 +26,6 @@ int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
int argc = 0;
int i;
- buf = strcpy(alloca(strlen(s) + 1), s);
src = s;
dst = buf;
argv[argc] = buf;