Skip to content

Commit 0ab1faa

Browse files
jherlandgitster
authored andcommitted
Minor cosmetic fixes to notes.c
Signed-off-by: Johan Herland <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 67bc740 commit 0ab1faa

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

notes.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "cache.h"
22
#include "commit.h"
33
#include "notes.h"
4-
#include "refs.h"
54
#include "utf8.h"
65
#include "strbuf.h"
76
#include "tree-walk.h"
@@ -93,7 +92,7 @@ static void **note_tree_search(struct int_node **tree,
9392

9493
i = GET_NIBBLE(*n, key_sha1);
9594
p = (*tree)->a[i];
96-
switch(GET_PTR_TYPE(p)) {
95+
switch (GET_PTR_TYPE(p)) {
9796
case PTR_TYPE_INTERNAL:
9897
*tree = CLR_PTR_TYPE(p);
9998
(*n)++;
@@ -195,7 +194,7 @@ static void note_tree_insert(struct int_node *tree, unsigned char n,
195194

196195
assert(GET_PTR_TYPE(entry) == 0); /* no type bits set */
197196
l = (struct leaf_node *) CLR_PTR_TYPE(*p);
198-
switch(GET_PTR_TYPE(*p)) {
197+
switch (GET_PTR_TYPE(*p)) {
199198
case PTR_TYPE_NULL:
200199
assert(!*p);
201200
*p = SET_PTR_TYPE(entry, type);
@@ -257,7 +256,7 @@ static void note_tree_free(struct int_node *tree)
257256
unsigned int i;
258257
for (i = 0; i < 16; i++) {
259258
void *p = tree->a[i];
260-
switch(GET_PTR_TYPE(p)) {
259+
switch (GET_PTR_TYPE(p)) {
261260
case PTR_TYPE_INTERNAL:
262261
note_tree_free(CLR_PTR_TYPE(p));
263262
/* fall through */
@@ -274,7 +273,7 @@ static void note_tree_free(struct int_node *tree)
274273
* - hex_len - Length of above segment. Must be multiple of 2 between 0 and 40
275274
* - sha1 - Partial SHA1 value is written here
276275
* - 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)).
278277
* Otherwise, returns number of bytes written to sha1 (i.e. hex_len / 2).
279278
* Pads sha1 with NULs up to sha1_len (not included in returned length).
280279
*/

0 commit comments

Comments
 (0)