summaryrefslogtreecommitdiff
path: root/build/parsePrep.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1999-09-07 22:49:45 +0000
committerjbj <devnull@localhost>1999-09-07 22:49:45 +0000
commit6281ee4de1edd2882452f3cc0ddff5e8ab94f222 (patch)
treeac337f333f66859efe8d328e805da15921ee2a68 /build/parsePrep.c
parent834db501abf63981c5445edac45af8de278b0777 (diff)
downloadlibrpm-tizen-6281ee4de1edd2882452f3cc0ddff5e8ab94f222.tar.gz
librpm-tizen-6281ee4de1edd2882452f3cc0ddff5e8ab94f222.tar.bz2
librpm-tizen-6281ee4de1edd2882452f3cc0ddff5e8ab94f222.zip
Use sizeof("...")-1 throughout.
CVS patchset: 3268 CVS date: 1999/09/07 22:49:45
Diffstat (limited to 'build/parsePrep.c')
-rw-r--r--build/parsePrep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/build/parsePrep.c b/build/parsePrep.c
index 8d7c20e71..d1bf04666 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -362,7 +362,7 @@ static int doPatchMacro(Spec spec, char *line)
spec->lineNum, spec->line);
return RPMERR_BADSPEC;
}
- } else if (!strncmp(s, "-p", 2)) {
+ } else if (!strncmp(s, "-p", sizeof("-p")-1)) {
/* unfortunately, we must support -pX */
if (! strchr(" \t\n", s[2])) {
s = s + 2;
@@ -456,9 +456,9 @@ int parsePrep(Spec spec)
saveLines = lines;
while (*lines) {
res = 0;
- if (! strncmp(*lines, "%setup", 6)) {
+ if (! strncmp(*lines, "%setup", sizeof("%setup")-1)) {
res = doSetupMacro(spec, *lines);
- } else if (! strncmp(*lines, "%patch", 6)) {
+ } else if (! strncmp(*lines, "%patch", sizeof("%patch")-1)) {
res = doPatchMacro(spec, *lines);
} else {
appendLineStringBuf(spec->prep, *lines);