dbus/dbus dbus-string.c,1.52,1.53
Havoc Pennington
hp at freedesktop.org
Mon Nov 22 11:20:31 PST 2004
Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv12821/dbus
Modified Files:
dbus-string.c
Log Message:
2004-11-22 Havoc Pennington <hp at redhat.com>
* test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
threads for more time, so sysprof can get a grip on it.
* dbus/dbus-string.c (_dbus_string_validate_utf8): remove
pointless variable
Index: dbus-string.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-string.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- dbus-string.c 13 Nov 2004 07:07:46 -0000 1.52
+++ dbus-string.c 22 Nov 2004 19:20:29 -0000 1.53
@@ -2444,24 +2444,23 @@
int i, mask, char_len;
dbus_unichar_t result;
- const unsigned char c = (unsigned char) *p;
-
- if (c == 0) /* nul bytes not OK */
+ /* nul bytes considered invalid */
+ if (*p == '\0')
break;
/* Special-case ASCII; this makes us go a lot faster in
* D-BUS profiles where we are typically validating
* function names and such. We have to know that
* all following checks will pass for ASCII though,
- * comments follow ...
- */
- if (c < 128)
+ * comments follow ...
+ */
+ if (*p < 128)
{
++p;
continue;
}
- UTF8_COMPUTE (c, mask, char_len);
+ UTF8_COMPUTE (*p, mask, char_len);
if (_DBUS_UNLIKELY (char_len == 0)) /* ASCII: char_len == 1 */
break;
More information about the dbus-commit
mailing list