aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-13 18:44:22 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-13 18:44:22 +0000
commit8870e1bfaed6b6a6458065e85e58d8a214cceb68 (patch)
treee9889de44973281b224d30a774dfeeb0237f8a6c
parent38b88ed85d9d472c62209370f94ce82b3eb80c15 (diff)
downloadperl-URPM-8870e1bfaed6b6a6458065e85e58d8a214cceb68.tar
perl-URPM-8870e1bfaed6b6a6458065e85e58d8a214cceb68.tar.gz
perl-URPM-8870e1bfaed6b6a6458065e85e58d8a214cceb68.tar.bz2
perl-URPM-8870e1bfaed6b6a6458065e85e58d8a214cceb68.tar.xz
perl-URPM-8870e1bfaed6b6a6458065e85e58d8a214cceb68.zip
style: put return at line after if ()
-rw-r--r--URPM.xs27
1 files changed, 18 insertions, 9 deletions
diff --git a/URPM.xs b/URPM.xs
index 65f8e27..bed82a6 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -181,17 +181,20 @@ print_list_entry(char *buff, int sz, const char *name, rpmsenseFlags flags, cons
int len = strlen(name);
char *p = buff;
- if (len >= sz || !strncmp(name, "rpmlib(", 7)) return -1;
+ if (len >= sz || !strncmp(name, "rpmlib(", 7))
+ return -1;
memcpy(p, name, len); p += len;
if (flags & (RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_POST)) {
- if (p - buff + 3 >= sz) return -1;
+ if (p - buff + 3 >= sz)
+ return -1;
memcpy(p, "[*]", 4); p += 3;
}
if (evr != NULL) {
len = strlen(evr);
if (len > 0) {
- if (p - buff + 6 + len >= sz) return -1;
+ if (p - buff + 6 + len >= sz)
+ return -1;
*p++ = '[';
if (flags & RPMSENSE_LESS) *p++ = '<';
if (flags & RPMSENSE_GREATER) *p++ = '>';
@@ -398,11 +401,13 @@ return_list_str(char *s, const Header header, rpmTag tag_name, rpmTag tag_flags,
if (tag_flags && tag_version) {
while(ps != NULL) {
++count;
- if (f(s, ps-s, NULL, 0, NULL, param)) return -count;
+ if (f(s, ps-s, NULL, 0, NULL, param))
+ return -count;
s = ps + 1; ps = strchr(s, '@');
}
++count;
- if (f(s, 0, NULL, 0, NULL, param)) return -count;
+ if (f(s, 0, NULL, 0, NULL, param))
+ return -count;
} else {
char *eos;
while(ps != NULL) {
@@ -414,7 +419,8 @@ return_list_str(char *s, const Header header, rpmTag tag_name, rpmTag tag_flags,
}
eos = strchr(s, '['); if (!eos) eos = strchr(s, ' ');
++count;
- if (f(s, eos ? eos-s : 0, NULL, 0, NULL, param)) return -count;
+ if (f(s, eos ? eos-s : 0, NULL, 0, NULL, param))
+ return -count;
}
} else if (header) {
struct rpmtd_s list, flags, list_evr;
@@ -451,7 +457,8 @@ xpush_simple_list_str(const Header header, rpmTag tag_name) {
const char *val;
int size;
- if (!headerGet(header, tag_name, &list, HEADERGET_DEFAULT)) return 0;
+ if (!headerGet(header, tag_name, &list, HEADERGET_DEFAULT))
+ return 0;
size = rpmtdCount(&list);
while ((val = rpmtdNextString(&list))) {
@@ -503,7 +510,8 @@ return_list_tag_modifier(const Header header, rpmTag tag_name) {
dSP;
int i;
struct rpmtd_s td;
- if (!headerGet(header, tag_name, &td, HEADERGET_DEFAULT)) return;
+ if (!headerGet(header, tag_name, &td, HEADERGET_DEFAULT))
+ return;
int count = rpmtdCount(&td);
int32_t *list = td.data;
@@ -655,7 +663,8 @@ return_files(const Header header, int filter_mode) {
char **list = NULL;
if (!baseNames || !dirNames || !dirIndexes) {
- if (!headerGet(header, RPMTAG_OLDFILENAMES, &td_list, HEADERGET_DEFAULT)) return;
+ if (!headerGet(header, RPMTAG_OLDFILENAMES, &td_list, HEADERGET_DEFAULT))
+ return;
list = td_list.data;
}