diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-05-14 10:56:57 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-14 10:56:57 +0300 |
commit | 2c0416811af443c49bd5c6f3ee3a7ef93033ca8e (patch) | |
tree | 1fe4acecd91dfabd869e69f6516235a714ef3dfd | |
parent | e0564b7c71e9e675af27d0ee79bee15db152a1c8 (diff) | |
download | librpm-tizen-2c0416811af443c49bd5c6f3ee3a7ef93033ca8e.tar.gz librpm-tizen-2c0416811af443c49bd5c6f3ee3a7ef93033ca8e.tar.bz2 librpm-tizen-2c0416811af443c49bd5c6f3ee3a7ef93033ca8e.zip |
Only pass what's needed to parseForDev()
- It dosn't need the entire filelist, just the buffer and current
file entry
-rw-r--r-- | build/files.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/build/files.c b/build/files.c index 8dbeb73a5..9459b0e84 100644 --- a/build/files.c +++ b/build/files.c @@ -355,10 +355,10 @@ exit: /** * Parse %dev from file manifest. * @param buf current spec file line - * @param fl package file tree walk data + * @param cur current file entry data * @return RPMRC_OK on success */ -static rpmRC parseForDev(char * buf, FileList fl) +static rpmRC parseForDev(char * buf, FileEntry cur) { const char * name; const char * errstr = NULL; @@ -395,9 +395,9 @@ static rpmRC parseForDev(char * buf, FileList fl) p = q; SKIPWHITE(p); pe = p; SKIPNONWHITE(pe); if (*pe != '\0') *pe++ = '\0'; if (*p == 'b') - fl->cur.devtype = 'b'; + cur->devtype = 'b'; else if (*p == 'c') - fl->cur.devtype = 'c'; + cur->devtype = 'c'; else { errstr = "devtype"; goto exit; @@ -408,8 +408,8 @@ static rpmRC parseForDev(char * buf, FileList fl) for (pe = p; *pe && risdigit(*pe); pe++) {} ; if (*pe == '\0') { - fl->cur.devmajor = atoi(p); - if (!(fl->cur.devmajor >= 0 && fl->cur.devmajor < 256)) { + cur->devmajor = atoi(p); + if (!(cur->devmajor >= 0 && cur->devmajor < 256)) { errstr = "devmajor"; goto exit; } @@ -424,8 +424,8 @@ static rpmRC parseForDev(char * buf, FileList fl) for (pe = p; *pe && risdigit(*pe); pe++) {} ; if (*pe == '\0') { - fl->cur.devminor = atoi(p); - if (!(fl->cur.devminor >= 0 && fl->cur.devminor < 256)) { + cur->devminor = atoi(p); + if (!(cur->devminor >= 0 && cur->devminor < 256)) { errstr = "devminor"; goto exit; } @@ -1791,7 +1791,7 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, if (parseForVerify(buf, &fl.cur, &fl.def) || parseForAttr(buf, &fl.cur, &fl.def) || - parseForDev(buf, &fl) || + parseForDev(buf, &fl.cur) || parseForConfig(buf, &fl) || parseForLang(buf, &fl) || parseForCaps(buf, &fl) || |