This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] bcache.c, white space
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 13 May 2010 15:06:01 -0700
- Subject: [ob] bcache.c, white space
more of the same, plus a little re-indent.
2010-05-13 Michael Snyder <msnyder@vmware.com>
* bcache.c: White space.
Index: bcache.c
===================================================================
RCS file: /cvs/src/src/gdb/bcache.c,v
retrieving revision 1.26
diff -u -p -r1.26 bcache.c
--- bcache.c 12 Jan 2010 21:40:24 -0000 1.26
+++ bcache.c 13 May 2010 22:03:45 -0000
@@ -98,17 +98,17 @@ struct bcache
unsigned long
hash(const void *addr, int length)
{
- const unsigned char *k, *e;
- unsigned long h;
-
- k = (const unsigned char *)addr;
- e = k+length;
- for (h=0; k< e;++k)
- {
- h *=16777619;
- h ^= *k;
- }
- return (h);
+ const unsigned char *k, *e;
+ unsigned long h;
+
+ k = (const unsigned char *)addr;
+ e = k+length;
+ for (h=0; k< e;++k)
+ {
+ h *=16777619;
+ h ^= *k;
+ }
+ return (h);
}
/* Growing the bcache's hash table. */
@@ -152,6 +152,7 @@ expand_hash_table (struct bcache *bcache
/* Allocate the new table. */
{
size_t new_size = new_num_buckets * sizeof (new_buckets[0]);
+
new_buckets = (struct bstring **) xmalloc (new_size);
memset (new_buckets, 0, new_size);
@@ -257,6 +258,7 @@ bcache_full (const void *addr, int lengt
{
struct bstring *new
= obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
+
memcpy (&new->d.data, addr, length);
new->length = length;
new->next = bcache->bucket[hash_index];
@@ -281,6 +283,7 @@ bcache_xmalloc (void)
{
/* Allocate the bcache pre-zeroed. */
struct bcache *b = XCALLOC (1, struct bcache);
+
return b;
}