[SCM] Debian Qt/KDE packaging tools branch, master, updated. debian/0.13.1-12-gef732bc
Modestas Vainius
modax at alioth.debian.org
Wed May 25 12:11:30 UTC 2011
The following commit has been merged in the master branch:
commit 381ec693822b1643d9fb53833a6dd8ca35e83693
Author: Modestas Vainius <modax at debian.org>
Date: Wed May 25 03:50:29 2011 +0300
fixup: error stuff.
---
dlrestrictions/dlrestrictions.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlrestrictions/dlrestrictions.c b/dlrestrictions/dlrestrictions.c
index 39a5717..a46978b 100644
--- a/dlrestrictions/dlrestrictions.c
+++ b/dlrestrictions/dlrestrictions.c
@@ -105,8 +105,9 @@ int dlr_snprintf_pretty_error(char *str, size_t n, const char *context)
dlr_err = dlr_error();
sys_err = (errno != 0) ? strerror(errno) : NULL;
- if (dlr_err == NULL && sys_err == NULL)
- return;
+ if (dlr_err == NULL && sys_err == NULL) {
+ return 0;
+ }
if (dlr_err) {
if (sys_err != NULL) {
@@ -123,9 +124,15 @@ int dlr_snprintf_pretty_error(char *str, size_t n, const char *context)
void dlr_print_pretty_error(const char *context)
{
char buf[2048];
+ int r;
+
+ r = dlr_snprintf_pretty_error(buf, 2048, context);
+ if (r == 0) {
+ return;
+ } else if (r < 0) {
+ strcpy(buf, "Unable to pretty print DLRestrictions error.");
+ }
- strcpy(buf, "Unable to pretty print DLRestrictions error. Too long?");
- dlr_snprintf_pretty_error(buf, 2048, context);
fputs(buf, stderr);
fprintf(stderr, "
");
}
--
Debian Qt/KDE packaging tools
More information about the pkg-kde-commits
mailing list