diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/select.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/select.c b/src/main/select.c index d71202e..6e81d97 100644 --- a/src/main/select.c +++ b/src/main/select.c @@ -156,7 +156,6 @@ setselections(const char *const *argv) ohshit(_("unexpected end of file in package name at line %d"), lno); if (c == '\n') ohshit(_("unexpected end of line in package name at line %d"),lno); } - varbuf_end_str(&namevb); while (c != EOF && c_isspace(c)) { c= getchar(); @@ -170,28 +169,29 @@ setselections(const char *const *argv) varbuf_add_char(&selvb, c); c= getchar(); } - varbuf_end_str(&selvb); while (c != EOF && c != '\n') { c= getchar(); if (!c_isspace(c)) ohshit(_("unexpected data after package and selection at line %d"),lno); } - pkg = pkg_spec_parse_pkg(namevb.buf, &err); + pkg = pkg_spec_parse_pkg(varbuf_str(&namevb), &err); if (pkg == NULL) ohshit(_("illegal package name at line %d: %.250s"), lno, err.str); if (!pkg_is_informative(pkg, &pkg->installed) && !pkg_is_informative(pkg, &pkg->available)) { db_possibly_outdated = true; - warning(_("package not in status nor available database at line %d: %.250s"), lno, namevb.buf); + warning(_("package not in status nor available database at line %d: %.250s"), + lno, varbuf_str(&namevb)); lno++; continue; } - nv = namevalue_find_by_name(wantinfos, selvb.buf); + nv = namevalue_find_by_name(wantinfos, varbuf_str(&selvb)); if (nv == NULL) - ohshit(_("unknown wanted status at line %d: %.250s"), lno, selvb.buf); + ohshit(_("unknown wanted status at line %d: %.250s"), + lno, varbuf_str(&selvb)); pkg_set_want(pkg, nv->value); if (c == EOF) break; |