The following commit has been merged in the master branch:
commit cf6f6916131e87daa4506661011b11404dbd3adb
Author: Guillem Jover <[email protected]>
Date: Fri Aug 21 00:04:24 2009 +0200
libdpkg: Use ohshit instead of ohshite on config parsing errors
Parsing errors do not set errno, so it will either get a bogus value
from an old error, or Success, which is uninteresting.
diff --git a/lib/dpkg/myopt.c b/lib/dpkg/myopt.c
index 81f3a5b..454d3b4 100644
--- a/lib/dpkg/myopt.c
+++ b/lib/dpkg/myopt.c
@@ -90,15 +90,18 @@ void myfileopt(const char* fn, const struct cmdinfo*
cmdinfos) {
}
}
- if (!cip->olong) ohshite(_("configuration error: unknown option %s"),
linebuf);
+ if (!cip->olong)
+ ohshit(_("configuration error: unknown option %s"), linebuf);
if (cip->takesvalue) {
- if (!opt) ohshite(_("configuration error: %s needs a value"), linebuf);
+ if (!opt)
+ ohshit(_("configuration error: %s needs a value"), linebuf);
if (cip->call) cip->call(cip,opt);
else
*cip->sassignto = m_strdup(opt);
} else {
- if (opt) ohshite(_("configuration error: %s does not take a value"),
linebuf);
+ if (opt)
+ ohshit(_("configuration error: %s does not take a value"), linebuf);
if (cip->call) cip->call(cip,NULL);
else *cip->iassignto= cip->arg;
}
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]