summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/files.c28
-rw-r--r--build/names.c8
-rw-r--r--build/pack.c12
-rw-r--r--build/parseChangelog.c4
-rw-r--r--build/parseDescription.c2
-rw-r--r--build/parseFiles.c2
-rw-r--r--build/parsePreamble.c16
-rw-r--r--build/parsePrep.c4
-rw-r--r--build/parseReqs.c2
-rw-r--r--build/parseScript.c2
-rw-r--r--build/parseSpec.c18
-rw-r--r--build/reqprov.c4
-rw-r--r--build/rpmfc.c12
-rw-r--r--build/spec.c2
14 files changed, 57 insertions, 59 deletions
diff --git a/build/files.c b/build/files.c
index 6006d8963..d8ca3d38b 100644
--- a/build/files.c
+++ b/build/files.c
@@ -333,7 +333,7 @@ static rpmRC parseForVerify(const char * buf, FileList fl)
{ VFA_t *vfa;
for (vfa = verifyAttrs; vfa->attribute != NULL; vfa++) {
- if (strcmp(p, vfa->attribute))
+ if (!rstreq(p, vfa->attribute))
continue;
verifyFlags |= vfa->flag;
break;
@@ -342,7 +342,7 @@ static rpmRC parseForVerify(const char * buf, FileList fl)
continue;
}
- if (!strcmp(p, "not")) {
+ if (rstreq(p, "not")) {
negated ^= 1;
} else {
rpmlog(RPMLOG_ERR, _("Invalid %s token: %s\n"), name, p);
@@ -643,9 +643,9 @@ static rpmRC parseForConfig(const char * buf, FileList fl)
SKIPNONWHITE(pe);
if (*pe != '\0')
*pe++ = '\0';
- if (!strcmp(p, "missingok")) {
+ if (rstreq(p, "missingok")) {
fl->currentFlags |= RPMFILE_MISSINGOK;
- } else if (!strcmp(p, "noreplace")) {
+ } else if (rstreq(p, "noreplace")) {
fl->currentFlags |= RPMFILE_NOREPLACE;
} else {
rpmlog(RPMLOG_ERR, _("Invalid %s token: %s\n"), name, p);
@@ -732,7 +732,7 @@ static rpmRC parseForLang(const char * buf, FileList fl)
/* Check for duplicate locales */
if (fl->currentLangs != NULL)
for (i = 0; i < fl->nLangs; i++) {
- if (strncmp(fl->currentLangs[i], p, np))
+ if (!rstreqn(fl->currentLangs[i], p, np))
continue;
rpmlog(RPMLOG_ERR, _("Duplicate locale %.*s in %%lang(%s)\n"),
(int)np, p, q);
@@ -868,7 +868,7 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
while ((s = strtokWithQuotes(t, " \t\n")) != NULL) {
VFA_t *vfa;
t = NULL;
- if (!strcmp(s, "%docdir")) {
+ if (rstreq(s, "%docdir")) {
s = strtokWithQuotes(NULL, " \t\n");
if (s == NULL || strtokWithQuotes(NULL, " \t\n")) {
@@ -882,10 +882,10 @@ static rpmRC parseForSimple(rpmSpec spec, Package pkg, char * buf,
/* Set flags for virtual file attributes */
for (vfa = virtualFileAttributes; vfa->attribute != NULL; vfa++) {
- if (strcmp(s, vfa->attribute))
+ if (!rstreq(s, vfa->attribute))
continue;
if (!vfa->flag) {
- if (!strcmp(s, "%dir"))
+ if (rstreq(s, "%dir"))
fl->isDir = 1; /* XXX why not RPMFILE_DIR? */
} else {
if (vfa->not)
@@ -980,7 +980,7 @@ static int isDoc(FileList fl, const char * fileName)
k = strlen(fileName);
for (dd = fl->docDirs; *dd; dd++) {
l = strlen(*dd);
- if (l < k && strncmp(fileName, *dd, l) == 0 && fileName[l] == '/')
+ if (l < k && rstreqn(fileName, *dd, l) && fileName[l] == '/')
return 1;
}
return 0;
@@ -1083,7 +1083,7 @@ static void genCpioListAndHeader(FileList fl,
for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) {
/* Merge duplicate entries. */
while (i < (fl->fileListRecsUsed - 1) &&
- !strcmp(flp->cpioPath, flp[1].cpioPath)) {
+ rstreq(flp->cpioPath, flp[1].cpioPath)) {
/* Two entries for the same file found, merge the entries. */
/* Note that an %exclude is a duplication of a file reference */
@@ -1212,8 +1212,8 @@ static void genCpioListAndHeader(FileList fl,
if (S_ISLNK(flp->fl_mode)) {
buf[readlink(flp->diskPath, buf, BUFSIZ)] = '\0';
if (fl->buildRoot) {
- if (buf[0] == '/' && strcmp(fl->buildRoot, "/") &&
- !strncmp(buf, fl->buildRoot, strlen(fl->buildRoot))) {
+ if (buf[0] == '/' && !rstreq(fl->buildRoot, "/") &&
+ rstreqn(buf, fl->buildRoot, strlen(fl->buildRoot))) {
rpmlog(RPMLOG_ERR,
_("Symlink points to BuildRoot: %s -> %s\n"),
flp->cpioPath, buf);
@@ -1356,7 +1356,7 @@ static rpmRC addFile(FileList fl, const char * diskPath,
* myftw path stat
*
*/
- if (fl->buildRoot && strcmp(fl->buildRoot, "/"))
+ if (fl->buildRoot && !rstreq(fl->buildRoot, "/"))
cpioPath += strlen(fl->buildRoot);
/* XXX make sure '/' can be packaged also */
@@ -2256,7 +2256,7 @@ int processBinaryFiles(rpmSpec spec, int installSpecialDoc, int test)
(rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
goto exit;
- if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) {
+ if (rstreq(a, "noarch") && headerGetColor(pkg->header) != 0) {
int terminate = rpmExpandNumeric("%{?_binaries_in_noarch_packages_terminate_build}");
rpmlog(terminate ? RPMLOG_ERR : RPMLOG_WARNING,
_("Arch dependent binaries in noarch package\n"));
diff --git a/build/names.c b/build/names.c
index 0917a3c19..4e8b1cce3 100644
--- a/build/names.c
+++ b/build/names.c
@@ -60,7 +60,7 @@ const char *getUnameS(const char *uname)
for (x = 0; x < uid_used; x++) {
if (unames[x] == NULL) continue;
- if (!strcmp(unames[x],uname))
+ if (rstreq(unames[x],uname))
return unames[x];
}
@@ -85,7 +85,7 @@ uid_t getUidS(const char *uname)
for (x = 0; x < uid_used; x++) {
if (unames[x] == NULL) continue;
- if (!strcmp(unames[x],uname))
+ if (rstreq(unames[x],uname))
return uids[x];
}
@@ -132,7 +132,7 @@ const char *getGnameS(const char *gname)
for (x = 0; x < gid_used; x++) {
if (gnames[x] == NULL) continue;
- if (!strcmp(gnames[x], gname))
+ if (rstreq(gnames[x], gname))
return gnames[x];
}
@@ -157,7 +157,7 @@ gid_t getGidS(const char *gname)
for (x = 0; x < gid_used; x++) {
if (gnames[x] == NULL) continue;
- if (!strcmp(gnames[x], gname))
+ if (rstreq(gnames[x], gname))
return gids[x];
}
diff --git a/build/pack.c b/build/pack.c
index b0fc4fe19..8f51a135d 100644
--- a/build/pack.c
+++ b/build/pack.c
@@ -378,19 +378,19 @@ rpmRC writeRPM(Header *hdrp, unsigned char ** pkgidp, const char *fileName,
const char *compr = NULL;
headerPutString(h, RPMTAG_PAYLOADFORMAT, "cpio");
- if (strcmp(s+1, "gzdio") == 0) {
+ if (rstreq(s+1, "gzdio")) {
compr = "gzip";
#if HAVE_BZLIB_H
- } else if (strcmp(s+1, "bzdio") == 0) {
+ } else if (rstreq(s+1, "bzdio")) {
compr = "bzip2";
/* Add prereq on rpm version that understands bzip2 payloads */
(void) rpmlibNeedsFeature(h, "PayloadIsBzip2", "3.0.5-1");
#endif
#if HAVE_LZMA_H
- } else if (strcmp(s+1, "xzdio") == 0) {
+ } else if (rstreq(s+1, "xzdio")) {
compr = "xz";
(void) rpmlibNeedsFeature(h, "PayloadIsXz", "5.2-1");
- } else if (strcmp(s+1, "lzdio") == 0) {
+ } else if (rstreq(s+1, "lzdio")) {
compr = "lzma";
(void) rpmlibNeedsFeature(h, "PayloadIsLzma", "4.4.6-1");
#endif
@@ -659,7 +659,6 @@ static void addPackageProvides(Header h)
const char *name = NULL, *arch = NULL;
char *evr, *isaprov;
rpmsenseFlags pflags = RPMSENSE_EQUAL;
- int noarch = 0;
struct rpmtd_s archtd;
/* <name> = <evr> provide */
@@ -676,8 +675,7 @@ static void addPackageProvides(Header h)
isaprov = rpmExpand(name, "%{?_isa}", NULL);
headerGet(h, RPMTAG_ARCH, &archtd, HEADERGET_MINMEM);
arch = rpmtdGetString(&archtd);
- noarch = (strcmp(arch, "noarch") == 0);
- if (!noarch && strcmp(name, isaprov)) {
+ if (!rstreq(arch, "noarch") && !rstreq(name, isaprov)) {
headerPutString(h, RPMTAG_PROVIDENAME, isaprov);
headerPutString(h, RPMTAG_PROVIDEVERSION, evr);
headerPutUint32(h, RPMTAG_PROVIDEFLAGS, &pflags, 1);
diff --git a/build/parseChangelog.c b/build/parseChangelog.c
index 6c6e6a991..c68ed4ed7 100644
--- a/build/parseChangelog.c
+++ b/build/parseChangelog.c
@@ -52,7 +52,7 @@ static int dateToTimet(const char * datestr, time_t * secs)
p = pe; SKIPSPACE(p);
if (*p == '\0') goto exit;
pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
- for (idx = days; *idx && strcmp(*idx, p); idx++)
+ for (idx = days; *idx && !rstreq(*idx, p); idx++)
{};
if (*idx == NULL) goto exit;
@@ -60,7 +60,7 @@ static int dateToTimet(const char * datestr, time_t * secs)
p = pe; SKIPSPACE(p);
if (*p == '\0') goto exit;
pe = p; SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0';
- for (idx = months; *idx && strcmp(*idx, p); idx++)
+ for (idx = months; *idx && !rstreq(*idx, p); idx++)
{};
if (*idx == NULL) goto exit;
time.tm_mon = idx - months;
diff --git a/build/parseDescription.c b/build/parseDescription.c
index 606687895..5b9242d19 100644
--- a/build/parseDescription.c
+++ b/build/parseDescription.c
@@ -105,7 +105,7 @@ int parseDescription(rpmSpec spec)
}
stripTrailingBlanksStringBuf(sb);
- if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG))) {
+ if (!(noLang && !rstreq(lang, RPMBUILD_DEFAULT_LANG))) {
(void) headerAddI18NString(pkg->header, RPMTAG_DESCRIPTION,
getStringBuf(sb), lang);
}
diff --git a/build/parseFiles.c b/build/parseFiles.c
index 6bb76f822..8cde0cb71 100644
--- a/build/parseFiles.c
+++ b/build/parseFiles.c
@@ -65,7 +65,7 @@ int parseFiles(rpmSpec spec)
}
for (arg=1; arg<argc; arg++) {
- if (!strcmp(argv[arg], "-f") && argv[arg+1]) {
+ if (rstreq(argv[arg], "-f") && argv[arg+1]) {
char *file = rpmGetPath(argv[arg+1], NULL);
if (!pkg->fileFile) pkg->fileFile = newStringBuf();
appendLineStringBuf(pkg->fileFile, file);
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index b72da3bef..96b2fc067 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -81,7 +81,7 @@ static int parseSimplePart(const char *line, char **name, int *flag)
goto exit;
}
- if (!strcmp(tok, "-n")) {
+ if (rstreq(tok, "-n")) {
if (!(tok = strtok(NULL, " \t\n"))) {
rc = 1;
goto exit;
@@ -155,7 +155,7 @@ static int parseBits(const char * s, const tokenBits tokbits,
break;
for (tb = tokbits; tb->name; tb++) {
if (tb->name != NULL &&
- strlen(tb->name) == (se-s) && !strncmp(tb->name, s, (se-s)))
+ strlen(tb->name) == (se-s) && rstreqn(tb->name, s, (se-s)))
break;
}
if (tb->name == NULL)
@@ -394,9 +394,9 @@ static rpmRC readIcon(Header h, const char * file)
if (rc != RPMRC_OK)
goto exit;
- if (! strncmp((char*)icon, "GIF", sizeof("GIF")-1)) {
+ if (rstreqn((char*)icon, "GIF", sizeof("GIF")-1)) {
headerPutBin(h, RPMTAG_GIF, icon, iconsize);
- } else if (! strncmp((char*)icon, "/* XPM", sizeof("/* XPM")-1)) {
+ } else if (rstreqn((char*)icon, "/* XPM", sizeof("/* XPM")-1)) {
headerPutBin(h, RPMTAG_XPM, icon, iconsize);
} else {
rpmlog(RPMLOG_ERR, _("Unknown icon type: %s\n"), file);
@@ -426,7 +426,7 @@ spectag stashSt(rpmSpec spec, Header h, rpmTag tag, const char * lang)
t->t_nlines = 1;
t->t_lang = xstrdup(lang);
t->t_msgid = NULL;
- if (!(t->t_lang && strcmp(t->t_lang, RPMBUILD_DEFAULT_LANG))) {
+ if (!(t->t_lang && !rstreq(t->t_lang, RPMBUILD_DEFAULT_LANG))) {
struct rpmtd_s td;
if (headerGet(h, RPMTAG_NAME, &td, HEADERGET_MINMEM)) {
rasprintf(&t->t_msgid, "%s(%s)",
@@ -544,7 +544,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
case RPMTAG_PACKAGER:
if (!*lang) {
headerPutString(pkg->header, tag, field);
- } else if (!(noLang && strcmp(lang, RPMBUILD_DEFAULT_LANG)))
+ } else if (!(noLang && !rstreq(lang, RPMBUILD_DEFAULT_LANG)))
(void) headerAddI18NString(pkg->header, tag, field, lang);
break;
case RPMTAG_BUILDROOT:
@@ -671,7 +671,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
spec->BACount = BACount;
spec->BANames = BANames;
} else {
- if (BACount != 1 || strcmp(BANames[0], "noarch")) {
+ if (BACount != 1 || !rstreq(BANames[0], "noarch")) {
rpmlog(RPMLOG_ERR,
_("line %d: Only noarch subpackages are supported: %s\n"),
spec->lineNum, spec->line);
@@ -900,7 +900,7 @@ int parsePreamble(rpmSpec spec, int initialPackage)
rpmlog(RPMLOG_ERR, _("%%{buildroot} couldn't be empty\n"));
goto exit;
}
- if (!strcmp(buildRoot, "/")) {
+ if (rstreq(buildRoot, "/")) {
rpmlog(RPMLOG_ERR, _("%%{buildroot} can not be \"/\"\n"));
goto exit;
}
diff --git a/build/parsePrep.c b/build/parsePrep.c
index ba2a91992..172ef6bb1 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -536,9 +536,9 @@ int parsePrep(rpmSpec spec)
argvSplit(&saveLines, getStringBuf(sb), "\n");
for (lines = saveLines; *lines; lines++) {
res = 0;
- if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
+ if (rstreqn(*lines, "%setup", sizeof("%setup")-1)) {
res = doSetupMacro(spec, *lines);
- } else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) {
+ } else if (rstreqn(*lines, "%patch", sizeof("%patch")-1)) {
res = doPatchMacro(spec, *lines);
} else {
appendLineStringBuf(spec->prep, *lines);
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 2d05d4155..5c8627fa7 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -126,7 +126,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
if (ve > v) {
const struct ReqComp *rc;
for (rc = ReqComparisons; rc->token != NULL; rc++) {
- if ((ve-v) != strlen(rc->token) || strncmp(v, rc->token, (ve-v)))
+ if ((ve-v) != strlen(rc->token) || !rstreqn(v, rc->token, (ve-v)))
continue;
if (r[0] == '/') {
diff --git a/build/parseScript.c b/build/parseScript.c
index 1b530709a..c4249516e 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -267,7 +267,7 @@ int parseScript(rpmSpec spec, int parsePart)
p = getStringBuf(sb);
#ifdef WITH_LUA
- if (!strcmp(progArgv[0], "<lua>")) {
+ if (rstreq(progArgv[0], "<lua>")) {
rpmlua lua = NULL; /* Global state. */
if (rpmluaCheckScript(lua, p, partname) != RPMRC_OK) {
goto exit;
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 996c4d1ca..24b0cbf78 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -289,29 +289,29 @@ int readLine(rpmSpec spec, int strip)
SKIPSPACE(s);
match = -1;
- if (!spec->readStack->reading && !strncmp("%if", s, sizeof("%if")-1)) {
+ if (!spec->readStack->reading && rstreqn("%if", s, sizeof("%if")-1)) {
match = 0;
- } else if (! strncmp("%ifarch", s, sizeof("%ifarch")-1)) {
+ } else if (rstreqn("%ifarch", s, sizeof("%ifarch")-1)) {
char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 7;
match = matchTok(arch, s);
arch = _free(arch);
- } else if (! strncmp("%ifnarch", s, sizeof("%ifnarch")-1)) {
+ } else if (rstreqn("%ifnarch", s, sizeof("%ifnarch")-1)) {
char *arch = rpmExpand("%{_target_cpu}", NULL);
s += 8;
match = !matchTok(arch, s);
arch = _free(arch);
- } else if (! strncmp("%ifos", s, sizeof("%ifos")-1)) {
+ } else if (rstreqn("%ifos", s, sizeof("%ifos")-1)) {
char *os = rpmExpand("%{_target_os}", NULL);
s += 5;
match = matchTok(os, s);
os = _free(os);
- } else if (! strncmp("%ifnos", s, sizeof("%ifnos")-1)) {
+ } else if (rstreqn("%ifnos", s, sizeof("%ifnos")-1)) {
char *os = rpmExpand("%{_target_os}", NULL);
s += 6;
match = !matchTok(os, s);
os = _free(os);
- } else if (! strncmp("%if", s, sizeof("%if")-1)) {
+ } else if (rstreqn("%if", s, sizeof("%if")-1)) {
s += 3;
match = parseExpressionBoolean(spec, s);
if (match < 0) {
@@ -320,7 +320,7 @@ int readLine(rpmSpec spec, int strip)
ofi->fileName, ofi->lineNum, match);
return PART_ERROR;
}
- } else if (! strncmp("%else", s, sizeof("%else")-1)) {
+ } else if (rstreqn("%else", s, sizeof("%else")-1)) {
s += 5;
if (! spec->readStack->next) {
/* Got an else with no %if ! */
@@ -332,7 +332,7 @@ int readLine(rpmSpec spec, int strip)
spec->readStack->reading =
spec->readStack->next->reading && ! spec->readStack->reading;
spec->line[0] = '\0';
- } else if (! strncmp("%endif", s, sizeof("%endif")-1)) {
+ } else if (rstreqn("%endif", s, sizeof("%endif")-1)) {
s += 6;
if (! spec->readStack->next) {
/* Got an end with no %if ! */
@@ -345,7 +345,7 @@ int readLine(rpmSpec spec, int strip)
spec->readStack = spec->readStack->next;
free(rl);
spec->line[0] = '\0';
- } else if (! strncmp("%include", s, sizeof("%include")-1)) {
+ } else if (rstreqn("%include", s, sizeof("%include")-1)) {
char *fileName, *endFileName, *p;
s += 8;
diff --git a/build/reqprov.c b/build/reqprov.c
index e474cdb48..a57c6ae6d 100644
--- a/build/reqprov.c
+++ b/build/reqprov.c
@@ -25,8 +25,8 @@ static int isNewDep(Header h, rpmTag nametag,
/* XXX there's no guarantee the ds is sorted here so rpmdsFind() wont do */
rpmdsInit(ads);
while (new && rpmdsNext(ads) >= 0) {
- if (strcmp(rpmdsN(ads), rpmdsN(bds))) continue;
- if (strcmp(rpmdsEVR(ads), rpmdsEVR(bds))) continue;
+ if (!rstreq(rpmdsN(ads), rpmdsN(bds))) continue;
+ if (!rstreq(rpmdsEVR(ads), rpmdsEVR(bds))) continue;
if (rpmdsFlags(ads) != rpmdsFlags(bds)) continue;
if (indextag && rpmtdSetIndex(&idx, rpmdsIx(ads)) >= 0 &&
rpmtdGetNumber(&idx) != index) continue;
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 642be6c97..64837819a 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -733,9 +733,9 @@ static int rpmfcSCRIPT(rpmfc fc)
/* Set color based on interpreter name. */
bn = basename(s);
- if (!strcmp(bn, "perl"))
+ if (rstreq(bn, "perl"))
fc->fcolor->vals[fc->ix] |= RPMFC_PERL;
- else if (!strncmp(bn, "python", sizeof("python")-1))
+ else if (rstreqn(bn, "python", sizeof("python")-1))
fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
break;
@@ -883,7 +883,7 @@ static int rpmfcELF(rpmfc fc)
} else
if (soname != NULL
&& !(filter_GLIBC_PRIVATE != 0
- && !strcmp(s, "GLIBC_PRIVATE")))
+ && rstreq(s, "GLIBC_PRIVATE")))
{
rasprintf(&buf, "%s(%s)%s", soname, s,
#if !defined(__alpha__)
@@ -940,7 +940,7 @@ static int rpmfcELF(rpmfc fc)
/* Filter dependencies that contain GLIBC_PRIVATE */
if (soname != NULL
&& !(filter_GLIBC_PRIVATE != 0
- && !strcmp(s, "GLIBC_PRIVATE")))
+ && rstreq(s, "GLIBC_PRIVATE")))
{
rasprintf(&buf, "%s(%s)%s", soname, s,
#if !defined(__alpha__)
@@ -1127,7 +1127,7 @@ rpmRC rpmfcApply(rpmfc fc)
fn += sizeof("/usr/lib")-1;
if (fn[0] == '6' && fn[1] == '4')
fn += 2;
- if (!strncmp(fn, "/python", sizeof("/python")-1))
+ if (rstreqn(fn, "/python", sizeof("/python")-1))
fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
}
}
@@ -1270,7 +1270,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
ftype = "pkgconfig file";
/* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
- else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
+ else if (slen >= fc->brlen+sizeof("/dev/") && rstreqn(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
ftype = "";
else
ftype = magic_file(ms, s);
diff --git a/build/spec.c b/build/spec.c
index 19974ef55..d1013c81f 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -84,7 +84,7 @@ rpmRC lookupPackage(rpmSpec spec, const char *name, int flag,Package *pkg)
/* Locate package with fullName */
for (p = spec->packages; p != NULL; p = p->next) {
(void) headerNVR(p->header, &pname, NULL, NULL);
- if (pname && (! strcmp(fullName, pname))) {
+ if (pname && (rstreq(fullName, pname))) {
break;
}
}