diff options
author | Guillem Jover <guillem@debian.org> | 2009-09-06 08:35:29 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2009-09-06 08:59:36 +0200 |
commit | cc9fc4d628664a69351f4a77b70baebb59c0a6e4 (patch) | |
tree | b2d9e5e440a56fef9e0e44fc271556ba80697ee0 /src/enquiry.c | |
parent | e8dc6b406eb25bd8025fdc756f2df7646a123843 (diff) | |
download | dpkg-cc9fc4d628664a69351f4a77b70baebb59c0a6e4.tar.gz |
dpkg: Use ohshit on bad version syntax in --compare-versions
Diffstat (limited to 'src/enquiry.c')
-rw-r--r-- | src/enquiry.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/enquiry.c b/src/enquiry.c index bcf374af5..60a39d356 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -443,21 +443,15 @@ void cmpversions(const char *const *argv) { if (*argv[0] && strcmp(argv[0],"<unknown>")) { emsg= parseversion(&a,argv[0]); - if (emsg) { - printf(_("dpkg: version '%s' has bad syntax: %s\n"), argv[0], emsg); - m_output(stdout, _("<standard output>")); - exit(1); - } + if (emsg) + ohshit(_("version '%s' has bad syntax: %s"), argv[0], emsg); } else { blankversion(&a); } if (*argv[2] && strcmp(argv[2],"<unknown>")) { emsg= parseversion(&b,argv[2]); - if (emsg) { - printf(_("dpkg: version '%s' has bad syntax: %s\n"), argv[2], emsg); - m_output(stdout, _("<standard output>")); - exit(1); - } + if (emsg) + ohshit(_("version '%s' has bad syntax: %s"), argv[2], emsg); } else { blankversion(&b); } |