dix: switch to byte-counting functions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2009-07-03 16:50:03 +10:00
parent 7dd415aa6a
commit 2d35ea8d95
9 changed files with 54 additions and 53 deletions

View File

@@ -324,7 +324,7 @@ ProcListExtensions(ClientPtr client)
for (j = extensions[i]->num_aliases; --j >= 0;)
total_length += strlen(extensions[i]->aliases[j]) + 1;
}
reply.length = (total_length + 3) >> 2;
reply.length = bytes_to_int32(total_length);
buffer = bufptr = xalloc(total_length);
if (!buffer)
return(BadAlloc);