RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 08-Dec-2007 22:34:54
Branch: HEAD Handle: 2007120821345300
Modified files:
rpm CHANGES
rpm/lib rpmrc.c
Log:
- rpm.org: Yet More RPMRC_OK returns from functions.
Summary:
Revision Changes Path
1.1966 +1 -0 rpm/CHANGES
2.220 +8 -8 rpm/lib/rpmrc.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1965 -r1.1966 CHANGES
--- rpm/CHANGES 8 Dec 2007 21:30:19 -0000 1.1965
+++ rpm/CHANGES 8 Dec 2007 21:34:53 -0000 1.1966
@@ -1,4 +1,5 @@
5.0a4 -> 5.0b1:
+ - rpm.org: Yet More RPMRC_OK returns from functions.
- rpm.org: use RPMRC_OK, not 0, returns in many functions.
- rpm.org: @return, not @returns, in doxygen markup.
- rpm.org: Don't do tilde expansion if HOME not set.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmrc.c
============================================================================
$ cvs diff -u -r2.219 -r2.220 rpmrc.c
--- rpm/lib/rpmrc.c 6 Dec 2007 14:47:49 -0000 2.219
+++ rpm/lib/rpmrc.c 8 Dec 2007 21:34:53 -0000 2.220
@@ -430,10 +430,10 @@
/**
* Read and configure /etc/rpm/platform patterns.
* @param platform path to platform patterns
- * @return 0 on success
+ * @return RPMRC_OK on success
*/
/*@-onlytrans@*/ /* XXX miRE array, not refcounted. */
-static int rpmPlatform(const char * platform)
+static rpmRC rpmPlatform(const char * platform)
/*@globals nplatpat, platpat,
rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
/*@modifies nplatpat, platpat,
@@ -446,13 +446,13 @@
miRE mi_re = NULL;
int mi_nre = 0;
char * p, * pe;
- int rc;
+ rpmRC rc;
int xx;
rc = rpmioSlurp(platform, &b, &blen);
if (rc || b == NULL || blen <= 0) {
- rc = -1;
+ rc = RPMRC_FAIL;
goto exit;
}
@@ -495,7 +495,7 @@
init_platform++;
}
- rc = (init_platform ? 0 : -1);
+ rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
exit:
if (cvog) {
@@ -505,7 +505,7 @@
/*@-modobserver@*/
b = _free(b);
/*@=modobserver@*/
- if (rc == 0) {
+ if (rc == RPMRC_OK) {
platpat = mireFreeAll(platpat, nplatpat);
platpat = mi_re;
nplatpat = mi_nre;
@@ -608,9 +608,9 @@
cp = rpmExpand("%{?__platform}", NULL);
if (cp == NULL || cp[0] == '\0')
cp = platform;
- if (!rpmPlatform(cp)) {
+ if (rpmPlatform(cp) == RPMRC_OK) {
#else
- if (!rpmPlatform(platform)) {
+ if (rpmPlatform(platform) == RPMRC_OK) {
#endif
const char * s;
gotDefaults = 1;
@@ .
Received on Sat Dec 8 22:34:54 2007