@matheusbsbs / matheus-bagliano / commits / 0ab1faae39
Fork 0

Minor cosmetic fixes to notes.c

Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johan Herland committed Feb 13, 2010 at 22:28 UTC 0ab1faae39173be6126364461c1be86542e6b17d
1 file changed +4 -5
notes.c
+4 -5
@@ -1,7 +1,6 @@
1 #include "cache.h"
2 #include "commit.h"
3 #include "notes.h"
4 -#include "refs.h"
4 #include "utf8.h"
5 #include "strbuf.h"
6 #include "tree-walk.h"
@@ -93,7 +92,7 @@ static void **note_tree_search(struct int_node **tree,
92
93 i = GET_NIBBLE(*n, key_sha1);
94 p = (*tree)->a[i];
96 - switch(GET_PTR_TYPE(p)) {
95 + switch (GET_PTR_TYPE(p)) {
96 case PTR_TYPE_INTERNAL:
97 *tree = CLR_PTR_TYPE(p);
98 (*n)++;
@@ -195,7 +194,7 @@ static void note_tree_insert(struct int_node *tree, unsigned char n,
194
195 assert(GET_PTR_TYPE(entry) == 0); /* no type bits set */
196 l = (struct leaf_node *) CLR_PTR_TYPE(*p);
198 - switch(GET_PTR_TYPE(*p)) {
197 + switch (GET_PTR_TYPE(*p)) {
198 case PTR_TYPE_NULL:
199 assert(!*p);
200 *p = SET_PTR_TYPE(entry, type);
@@ -257,7 +256,7 @@ static void note_tree_free(struct int_node *tree)
256 unsigned int i;
257 for (i = 0; i < 16; i++) {
258 void *p = tree->a[i];
260 - switch(GET_PTR_TYPE(p)) {
259 + switch (GET_PTR_TYPE(p)) {
260 case PTR_TYPE_INTERNAL:
261 note_tree_free(CLR_PTR_TYPE(p));
262 /* fall through */
@@ -274,7 +273,7 @@ static void note_tree_free(struct int_node *tree)
273 * - hex_len - Length of above segment. Must be multiple of 2 between 0 and 40
274 * - sha1 - Partial SHA1 value is written here
275 * - sha1_len - Max #bytes to store in sha1, Must be >= hex_len / 2, and < 20
277 - * Returns -1 on error (invalid arguments or invalid SHA1 (not in hex format).
276 + * Returns -1 on error (invalid arguments or invalid SHA1 (not in hex format)).
277 * Otherwise, returns number of bytes written to sha1 (i.e. hex_len / 2).
278 * Pads sha1 with NULs up to sha1_len (not included in returned length).
279 */