1
1
#include "cache.h"
2
2
#include "commit.h"
3
3
#include "notes.h"
4
- #include "refs.h"
5
4
#include "utf8.h"
6
5
#include "strbuf.h"
7
6
#include "tree-walk.h"
@@ -93,7 +92,7 @@ static void **note_tree_search(struct int_node **tree,
93
92
94
93
i = GET_NIBBLE (* n , key_sha1 );
95
94
p = (* tree )-> a [i ];
96
- switch (GET_PTR_TYPE (p )) {
95
+ switch (GET_PTR_TYPE (p )) {
97
96
case PTR_TYPE_INTERNAL :
98
97
* tree = CLR_PTR_TYPE (p );
99
98
(* n )++ ;
@@ -195,7 +194,7 @@ static void note_tree_insert(struct int_node *tree, unsigned char n,
195
194
196
195
assert (GET_PTR_TYPE (entry ) == 0 ); /* no type bits set */
197
196
l = (struct leaf_node * ) CLR_PTR_TYPE (* p );
198
- switch (GET_PTR_TYPE (* p )) {
197
+ switch (GET_PTR_TYPE (* p )) {
199
198
case PTR_TYPE_NULL :
200
199
assert (!* p );
201
200
* p = SET_PTR_TYPE (entry , type );
@@ -257,7 +256,7 @@ static void note_tree_free(struct int_node *tree)
257
256
unsigned int i ;
258
257
for (i = 0 ; i < 16 ; i ++ ) {
259
258
void * p = tree -> a [i ];
260
- switch (GET_PTR_TYPE (p )) {
259
+ switch (GET_PTR_TYPE (p )) {
261
260
case PTR_TYPE_INTERNAL :
262
261
note_tree_free (CLR_PTR_TYPE (p ));
263
262
/* fall through */
@@ -274,7 +273,7 @@ static void note_tree_free(struct int_node *tree)
274
273
* - hex_len - Length of above segment. Must be multiple of 2 between 0 and 40
275
274
* - sha1 - Partial SHA1 value is written here
276
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)) .
278
277
* Otherwise, returns number of bytes written to sha1 (i.e. hex_len / 2).
279
278
* Pads sha1 with NULs up to sha1_len (not included in returned length).
280
279
*/
0 commit comments