xserver: Branch 'master' - 2 commits
Daniel Stone
daniels at kemper.freedesktop.org
Fri Mar 14 12:59:01 PDT 2008
mi/miregion.c | 11 ++++++++---
xkb/xkbUtils.c | 8 ++++----
2 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 090b26db767d296e7a3452da83b136d1caa0ed01
Author: Daniel Stone <daniel at fooishbar.org>
Date: Fri Mar 14 21:58:27 2008 +0200
XkbCopyKeymap: Fix broken indentation
An astute observer will note that the entirety of XkbCopyKeymap is indented
with spaces, and no tabs whatsoever, and not commit changes which break the
otherwise consistent indentation.
A non-astute observer will note the breakage when the commit mail comes
through with clearly broken indentation.
A polite, non-astute, observer will then fix it.
C'est la vie.
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index a3ae655..8339cef 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -1796,7 +1796,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
dsection = dst->geom->sections;
i < src->geom->num_sections;
i++, ssection++, dsection++) {
- *dsection = *ssection;
+ *dsection = *ssection;
if (ssection->num_rows) {
tmp = xcalloc(ssection->num_rows, sizeof(XkbRowRec));
if (!tmp)
@@ -1852,9 +1852,9 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
}
ddoodad->any.type = sdoodad->any.type;
}
- dsection->overlays = NULL;
- dsection->sz_overlays = 0;
- dsection->num_overlays = 0;
+ dsection->overlays = NULL;
+ dsection->sz_overlays = 0;
+ dsection->num_overlays = 0;
}
}
else {
commit 88bec0915e3867f8dbf859a3dfbb771d0d07092d
Author: Daniel Stone <daniel at fooishbar.org>
Date: Fri Mar 14 21:54:13 2008 +0200
mi: More meaningful assert crashes
When we fail an assert in miregion.c (which happens every now and then,
though I haven't yet checked up why), at least generate a segfault, so
we'll get a backtrace.
diff --git a/mi/miregion.c b/mi/miregion.c
index 45768a3..69ecdc2 100644
--- a/mi/miregion.c
+++ b/mi/miregion.c
@@ -89,9 +89,14 @@ Equipment Corporation.
#undef assert
#ifdef DEBUG
-#define assert(expr) {if (!(expr)) \
- FatalError("Assertion failed file %s, line %d: expr\n", \
- __FILE__, __LINE__); }
+#define assert(expr) { \
+ CARD32 *foo = NULL; \
+ if (!(expr)) { \
+ ErrorF("Assertion failed file %s, line %d: %s\n", \
+ __FILE__, __LINE__, #expr); \
+ *foo = 0xdeadbeef; /* to get a backtrace */ \
+ } \
+ }
#else
#define assert(expr)
#endif
More information about the xorg-commit
mailing list