diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-12-14 15:17:59 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-12-14 15:17:59 +0200 |
commit | 8d66d5fe4a9d7b7b015153edb8f204ac3b89c461 (patch) | |
tree | da32cd205771d4bc9ac3ead3797a3e0522a4b512 /build | |
parent | 7d817f06b14c221bf0fbf74610e4d85093e77fcc (diff) | |
download | librpm-tizen-8d66d5fe4a9d7b7b015153edb8f204ac3b89c461.tar.gz librpm-tizen-8d66d5fe4a9d7b7b015153edb8f204ac3b89c461.tar.bz2 librpm-tizen-8d66d5fe4a9d7b7b015153edb8f204ac3b89c461.zip |
Bunch of const char* corrections
- functions returning string constants as char * etc...
Diffstat (limited to 'build')
-rw-r--r-- | build/files.c | 2 | ||||
-rw-r--r-- | build/pack.c | 2 | ||||
-rw-r--r-- | build/parseChangelog.c | 8 | ||||
-rw-r--r-- | build/parseScript.c | 2 | ||||
-rw-r--r-- | build/spec.c | 2 |
5 files changed, 9 insertions, 7 deletions
diff --git a/build/files.c b/build/files.c index dc428a325..290503e17 100644 --- a/build/files.c +++ b/build/files.c @@ -920,7 +920,7 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf, } else { /* XXX WATCHOUT: buf is an arg */ { - static char *_docdir_fmt= 0; + static const char *_docdir_fmt = NULL; static int oneshot = 0; const char *ddir, *fmt, *errstr; if (!oneshot) { diff --git a/build/pack.c b/build/pack.c index db6228302..d848057af 100644 --- a/build/pack.c +++ b/build/pack.c @@ -256,7 +256,7 @@ static rpmRC processScriptFiles(rpmSpec spec, Package pkg) } else { /* This is dumb. When the header supports NULL string */ /* this will go away. */ - char *bull = ""; + const char *bull = ""; (void) headerAddOrAppendEntry(pkg->header, RPMTAG_TRIGGERSCRIPTS, RPM_STRING_ARRAY_TYPE, &bull, 1); } diff --git a/build/parseChangelog.c b/build/parseChangelog.c index e62745370..0c532150f 100644 --- a/build/parseChangelog.c +++ b/build/parseChangelog.c @@ -41,11 +41,13 @@ void addChangelogEntry(Header h, time_t time, const char *name, const char *text static int dateToTimet(const char * datestr, time_t * secs) { struct tm time; - char * p, * pe, * q, ** idx; + const char ** idx; + char * p, * pe, * q; + char * date = strcpy(alloca(strlen(datestr) + 1), datestr); -static char * days[] = +static const char * days[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", NULL }; -static char * months[] = +static const char * months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", NULL }; static char lengths[] = diff --git a/build/parseScript.c b/build/parseScript.c index a4b3224d0..98c9fb21e 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -73,7 +73,7 @@ int parseScript(rpmSpec spec, int parsePart) char *p; const char **progArgv = NULL; int progArgc; - char *partname = NULL; + const char *partname = NULL; rpm_tag_t reqtag = 0; rpm_tag_t tag = 0; int tagflags = 0; diff --git a/build/spec.c b/build/spec.c index 64d2a08bf..98a9cd4ef 100644 --- a/build/spec.c +++ b/build/spec.c @@ -246,7 +246,7 @@ int addSource(rpmSpec spec, Package pkg, const char *field, rpm_tag_t tag) { struct Source *p; int flag = 0; - char *name = NULL; + const char *name = NULL; char *nump; const char *fieldp = NULL; char buf[BUFSIZ]; |