aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-13 18:44:29 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-13 18:44:29 +0000
commit411ee00ba9ce654a135a3b9320a2c2ea26abf997 (patch)
tree11acbb4d69ff42e3c12d1f335cc73d4463304ce3
parent7df7c4b5fa53370a50e5584595c6851d89d403e0 (diff)
downloadperl-URPM-411ee00ba9ce654a135a3b9320a2c2ea26abf997.tar
perl-URPM-411ee00ba9ce654a135a3b9320a2c2ea26abf997.tar.gz
perl-URPM-411ee00ba9ce654a135a3b9320a2c2ea26abf997.tar.bz2
perl-URPM-411ee00ba9ce654a135a3b9320a2c2ea26abf997.tar.xz
perl-URPM-411ee00ba9ce654a135a3b9320a2c2ea26abf997.zip
style: put block at line after if ()
-rw-r--r--URPM.xs26
1 files changed, 21 insertions, 5 deletions
diff --git a/URPM.xs b/URPM.xs
index df152cc..b3f0a17 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -353,7 +353,11 @@ callback_list_str_overlap(char *s, int slen, const char *name, rpmsenseFlags fla
/* we need to extract name, flags and evr from a full sense information, store result in local copy */
if (s) {
- if (slen) { eos = s + slen; eosc = *eos; *eos = 0; }
+ if (slen) {
+ eos = s + slen;
+ eosc = *eos;
+ *eos = 0;
+ }
name = s;
while (*s && *s != ' ' && *s != '[' && *s != '<' && *s != '>' && *s != '=') ++s;
if (*s) {
@@ -372,7 +376,10 @@ callback_list_str_overlap(char *s, int slen, const char *name, rpmsenseFlags fla
}
/* mark end of name */
- if (eon) { eonc = *eon; *eon = 0; }
+ if (eon) {
+ eonc = *eon;
+ *eon = 0;
+ }
/* names should be equal, else it will not overlap */
if (!strcmp(name, os->name)) {
/* perform overlap according to direction needed, negative for left */
@@ -413,7 +420,10 @@ return_list_str(char *s, const Header header, rpmTag tag_name, rpmTag tag_flags,
while(ps != NULL) {
*ps = 0; eos = strchr(s, '['); if (!eos) eos = strchr(s, ' ');
++count;
- if (f(s, eos ? eos-s : ps-s, NULL, 0, NULL, param)) { *ps = '@'; return -count; }
+ if (f(s, eos ? eos-s : ps-s, NULL, 0, NULL, param)) {
+ *ps = '@';
+ return -count;
+ }
*ps = '@'; /* restore in memory modified char */
s = ps + 1; ps = strchr(s, '@');
}
@@ -2008,7 +2018,10 @@ Pkg_obsoletes_overlap(pkg, s, b_nopromote=1, direction=-1)
os.direction = direction;
os.b_nopromote = b_nopromote;
/* mark end of name */
- if (eon) { eonc = *eon; *eon = 0; }
+ if (eon) {
+ eonc = *eon;
+ *eon = 0;
+ }
/* return_list_str returns a negative value is the callback has returned non-zero */
RETVAL = return_list_str(ix == 0 ? pkg->obsoletes : pkg->provides, pkg->h, tag_name, tag_flags, tag_version,
callback_list_str_overlap, &os) < 0;
@@ -3037,7 +3050,10 @@ Urpm_parse_synthesis__XS(urpm, filename, ...)
if ((eol = strchr(p, '\n')) != NULL) {
do {
*eol++ = 0;
- if (!parse_line(depslist, provides, obsoletes, &pkg, p, urpm, callback)) { ok = 0; break; }
+ if (!parse_line(depslist, provides, obsoletes, &pkg, p, urpm, callback)) {
+ ok = 0;
+ break;
+ }
p = eol;
} while ((eol = strchr(p, '\n')) != NULL);
} else {