diff options
-rw-r--r-- | URPM.xs | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -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 { |