The following commit has been merged in the master branch:
commit 378737d036faf23bfa7ddf025f478099906b38ad
Author: Guillem Jover <[email protected]>
Date: Tue Sep 15 12:57:02 2009 +0200
Use character arrays instead of pointers for constant strings
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index 1db5038..0add640 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -74,7 +74,7 @@ static const char *arbitrary_fields[] = {
NULL
};
-static const char *private_prefix = "Private-";
+static const char private_prefix[] = "Private-";
static int known_arbitrary_field(const struct arbitraryfield *field) {
const char **known;
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index cdf61b2..72a73a5 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -266,7 +266,7 @@ parse_ensure_have_field(struct parsedb_state *ps,
const struct pkginfo *pigp,
const char **value, const char *what)
{
- static const char *empty = "";
+ static const char empty[] = "";
if (!*value) {
parse_warn(ps, pigp, _("missing %s"), what);
diff --git a/src/configure.c b/src/configure.c
index 68c5fad..ee5756a 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -94,7 +94,7 @@ void deferred_configure(struct pkginfo *pkg) {
char *currenthash = NULL, *newdisthash = NULL;
struct stat stab;
enum conffopt what;
- static const char *EMPTY_HASH = "-";
+ static const char EMPTY_HASH[] = "-";
if (pkg->status == stat_notinstalled)
ohshit(_("no package named `%s' is installed, cannot
configure"),pkg->name);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]