diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commit.h | 2 | ||||
-rw-r--r-- | src/fileops.h | 2 | ||||
-rw-r--r-- | src/git/commit.h | 4 | ||||
-rw-r--r-- | src/git/common.h | 10 | ||||
-rw-r--r-- | src/git/oid.h | 3 | ||||
-rw-r--r-- | src/git/revwalk.h | 4 | ||||
-rw-r--r-- | src/odb.c | 20 | ||||
-rw-r--r-- | src/util.h | 2 |
8 files changed, 23 insertions, 24 deletions
diff --git a/src/commit.h b/src/commit.h index 0b19f4634..05504cd34 100644 --- a/src/commit.h +++ b/src/commit.h @@ -9,7 +9,7 @@ struct git_commit { git_oid id; time_t commit_time; unsigned parsed:1, - flags:26; + flags:26; }; #endif diff --git a/src/fileops.h b/src/fileops.h index 53495ca95..dc5b2ce5d 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -34,7 +34,7 @@ extern int git__fsync(int fd); # ifndef GIT__WIN32_NO_HIDE_FILEOPS # define unlink(p) git__unlink(p) # define mkstemp(t) git__mkstemp(t) -# define mkdir(p,m) git__mkdir(p,m) +# define mkdir(p,m) git__mkdir(p, m) # define fsync(fd) git__fsync(fd) # endif #endif /* GIT_WIN32 */ diff --git a/src/git/commit.h b/src/git/commit.h index 979709bdb..010f258ae 100644 --- a/src/git/commit.h +++ b/src/git/commit.h @@ -25,14 +25,14 @@ typedef struct git_commit git_commit; * pool's git_odb, or if the commit is present but is * too malformed to be parsed successfully. */ -GIT_EXTERN(git_commit*) git_commit_parse(git_revpool *pool, const git_oid *id); +GIT_EXTERN(git_commit *) git_commit_parse(git_revpool *pool, const git_oid *id); /** * Get the id of a commit. * @param commit a previously parsed commit. * @return object identity for the commit. */ -GIT_EXTERN(const git_oid*) git_commit_id(git_commit *commit); +GIT_EXTERN(const git_oid *) git_commit_id(git_commit *commit); /** @} */ GIT_END_DECL diff --git a/src/git/common.h b/src/git/common.h index 375649f87..19c6a202c 100644 --- a/src/git/common.h +++ b/src/git/common.h @@ -16,8 +16,8 @@ /** Declare a public function exported for application use. */ #ifdef __GNUC__ # define GIT_EXTERN(type) extern \ - __attribute__((visibility("default"))) \ - type + __attribute__((visibility("default"))) \ + type #else # define GIT_EXTERN(type) extern type #endif @@ -25,9 +25,9 @@ /** Declare a public TLS symbol exported for application use. */ #ifdef __GNUC__ # define GIT_EXTERN_TLS(type) extern \ - __attribute__((visibility("default"))) \ - GIT_TLS \ - type + __attribute__((visibility("default"))) \ + GIT_TLS \ + type #else # define GIT_EXTERN_TLS(type) extern GIT_TLS type #endif diff --git a/src/git/oid.h b/src/git/oid.h index f3d6802e9..fe3c74b75 100644 --- a/src/git/oid.h +++ b/src/git/oid.h @@ -20,8 +20,7 @@ GIT_BEGIN_DECL #define GIT_OID_HEXSZ (GIT_OID_RAWSZ * 2) /** Unique identity of any object (commit, tree, blob, tag). */ -typedef struct -{ +typedef struct { /** raw binary formatted id */ unsigned char id[GIT_OID_RAWSZ]; } git_oid; diff --git a/src/git/revwalk.h b/src/git/revwalk.h index efaa4277c..5fac2a68a 100644 --- a/src/git/revwalk.h +++ b/src/git/revwalk.h @@ -25,7 +25,7 @@ GIT_BEGIN_DECL * @param db the database objects are read from. * @return the new traversal handle; NULL if memory is exhausted. */ -GIT_EXTERN(git_revpool*) gitrp_alloc(git_odb *db); +GIT_EXTERN(git_revpool *) gitrp_alloc(git_odb *db); /** * Reset the traversal machinary for reuse. @@ -52,7 +52,7 @@ GIT_EXTERN(void) gitrp_hide(git_revpool *pool, git_commit *commit); * @param pool the pool to pop the commit from. * @return next commit; NULL if there is no more output. */ -GIT_EXTERN(git_commit*) gitrp_next(git_revpool *pool); +GIT_EXTERN(git_commit *) gitrp_next(git_revpool *pool); /** * Free a revwalk previously allocated. @@ -100,7 +100,7 @@ typedef struct { /* object header data */ static struct { const char *str; /* type name string */ int loose; /* valid loose object type flag */ -} obj_type_table [] = { +} obj_type_table[] = { { "", 0 }, /* 0 = GIT_OBJ__EXT1 */ { "commit", 1 }, /* 1 = GIT_OBJ_COMMIT */ { "tree", 1 }, /* 2 = GIT_OBJ_TREE */ @@ -113,7 +113,7 @@ static struct { GIT_INLINE(uint32_t) decode32(void *b) { - return ntohl(*((uint32_t*)b)); + return ntohl(*((uint32_t *)b)); } GIT_INLINE(uint64_t) decode64(void *b) @@ -226,7 +226,7 @@ static int is_zlib_compressed_data(unsigned char *data) unsigned int w; w = ((unsigned int)(data[0]) << 8) + data[1]; - return data[0] == 0x78 && !(w %31); + return data[0] == 0x78 && !(w % 31); } static size_t get_binary_object_header(obj_hdr *hdr, gitfo_buf *obj) @@ -712,7 +712,7 @@ static int pack_openidx_v1(git_pack *p) p->idx_search = idxv1_search; p->im_fanout = im_fanout; - p->im_oid = (unsigned char*)(src_fanout + 256); + p->im_oid = (unsigned char *)(src_fanout + 256); return GIT_SUCCESS; } @@ -744,7 +744,7 @@ static int idxv2_search(off_t *out, git_pack *p, const git_oid *id) static int pack_openidx_v2(git_pack *p) { unsigned char *data = p->idx_map.data; - uint32_t *src_fanout = (uint32_t*)(data + 8); + uint32_t *src_fanout = (uint32_t *)(data + 8); uint32_t *im_fanout; int j; @@ -763,8 +763,8 @@ static int pack_openidx_v2(git_pack *p) p->idx_search = idxv2_search; p->im_fanout = im_fanout; - p->im_oid = (unsigned char*)(src_fanout + 256); - p->im_crc = (uint32_t*)(p->im_oid + 20 * p->obj_cnt); + p->im_oid = (unsigned char *)(src_fanout + 256); + p->im_crc = (uint32_t *)(p->im_oid + 20 * p->obj_cnt); p->im_offset32 = p->im_crc + p->obj_cnt; p->im_offset64 = p->im_offset32 + p->obj_cnt; return GIT_SUCCESS; @@ -900,7 +900,7 @@ static int scan_one_pack(void *state, char *name) return 0; } -static git_packlist* scan_packs(git_odb *db) +static git_packlist *scan_packs(git_odb *db) { char pb[GIT_PATH_MAX]; struct scanned_pack *state = NULL, *c; @@ -974,7 +974,7 @@ static int search_packs(git_pack **p, off_t *offset, git_odb *db, const git_oid pack_decidx(pack); if (!res) { - packlist_dec(db,pl); + packlist_dec(db, pl); if (p) *p = pack; if (offset) @@ -984,7 +984,7 @@ static int search_packs(git_pack **p, off_t *offset, git_odb *db, const git_oid } - packlist_dec(db,pl); + packlist_dec(db, pl); return GIT_ENOTFOUND; } diff --git a/src/util.h b/src/util.h index 3f541ffa6..4195117c1 100644 --- a/src/util.h +++ b/src/util.h @@ -58,6 +58,6 @@ GIT_INLINE(int) git__is_sizet(off_t p) alloc = alloc_nr(alloc); \ x = xrealloc((x), alloc * sizeof(*(x))); \ } \ - } while(0) + } while (0) #endif /* INCLUDE_util_h__ */ |