Unverified Commit 5bd49aee by Edward Thomson Committed by GitHub

Merge pull request #6045 from punkymaniac/qa-fix-coding-style-pointer

Fix coding style for pointer
parents 1f6263b8 379c4646
...@@ -133,7 +133,7 @@ typedef struct git_clone_options { ...@@ -133,7 +133,7 @@ typedef struct git_clone_options {
* The name of the branch to checkout. NULL means use the * The name of the branch to checkout. NULL means use the
* remote's default branch. * remote's default branch.
*/ */
const char* checkout_branch; const char *checkout_branch;
/** /**
* A callback used to create the new repository into which to * A callback used to create the new repository into which to
......
...@@ -84,8 +84,8 @@ GIT_EXTERN(void) git_note_iterator_free(git_note_iterator *it); ...@@ -84,8 +84,8 @@ GIT_EXTERN(void) git_note_iterator_free(git_note_iterator *it);
* (negative value) * (negative value)
*/ */
GIT_EXTERN(int) git_note_next( GIT_EXTERN(int) git_note_next(
git_oid* note_id, git_oid *note_id,
git_oid* annotated_id, git_oid *annotated_id,
git_note_iterator *it); git_note_iterator *it);
......
...@@ -243,7 +243,7 @@ GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote); ...@@ -243,7 +243,7 @@ GIT_EXTERN(const char *) git_remote_pushurl(const git_remote *remote);
* @param url the url to set * @param url the url to set
* @return 0 or an error value * @return 0 or an error value
*/ */
GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, const char* url); GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, const char *url);
/** /**
* Set the remote's url for pushing in the configuration. * Set the remote's url for pushing in the configuration.
...@@ -257,7 +257,7 @@ GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, con ...@@ -257,7 +257,7 @@ GIT_EXTERN(int) git_remote_set_url(git_repository *repo, const char *remote, con
* @param url the url to set * @param url the url to set
* @return 0, or an error code * @return 0, or an error code
*/ */
GIT_EXTERN(int) git_remote_set_pushurl(git_repository *repo, const char *remote, const char* url); GIT_EXTERN(int) git_remote_set_pushurl(git_repository *repo, const char *remote, const char *url);
/** /**
* Set the url for this particular url instance. The URL in the * Set the url for this particular url instance. The URL in the
...@@ -451,7 +451,7 @@ typedef int GIT_CALLBACK(git_push_transfer_progress_cb)( ...@@ -451,7 +451,7 @@ typedef int GIT_CALLBACK(git_push_transfer_progress_cb)(
unsigned int current, unsigned int current,
unsigned int total, unsigned int total,
size_t bytes, size_t bytes,
void* payload); void *payload);
/** /**
* Represents an update which will be performed on the remote during push * Represents an update which will be performed on the remote during push
......
...@@ -797,8 +797,8 @@ GIT_EXTERN(int) git_repository_hashfile( ...@@ -797,8 +797,8 @@ GIT_EXTERN(int) git_repository_hashfile(
* @return 0 on success, or an error code * @return 0 on success, or an error code
*/ */
GIT_EXTERN(int) git_repository_set_head( GIT_EXTERN(int) git_repository_set_head(
git_repository* repo, git_repository *repo,
const char* refname); const char *refname);
/** /**
* Make the repository HEAD directly point to the Commit. * Make the repository HEAD directly point to the Commit.
...@@ -817,8 +817,8 @@ GIT_EXTERN(int) git_repository_set_head( ...@@ -817,8 +817,8 @@ GIT_EXTERN(int) git_repository_set_head(
* @return 0 on success, or an error code * @return 0 on success, or an error code
*/ */
GIT_EXTERN(int) git_repository_set_head_detached( GIT_EXTERN(int) git_repository_set_head_detached(
git_repository* repo, git_repository *repo,
const git_oid* commitish); const git_oid *commitish);
/** /**
* Make the repository HEAD directly point to the Commit. * Make the repository HEAD directly point to the Commit.
...@@ -854,7 +854,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated( ...@@ -854,7 +854,7 @@ GIT_EXTERN(int) git_repository_set_head_detached_from_annotated(
* branch or an error code * branch or an error code
*/ */
GIT_EXTERN(int) git_repository_detach_head( GIT_EXTERN(int) git_repository_detach_head(
git_repository* repo); git_repository *repo);
/** /**
* Repository state * Repository state
......
...@@ -200,7 +200,7 @@ GIT_EXTERN(int) git_stash_apply( ...@@ -200,7 +200,7 @@ GIT_EXTERN(int) git_stash_apply(
*/ */
typedef int GIT_CALLBACK(git_stash_cb)( typedef int GIT_CALLBACK(git_stash_cb)(
size_t index, size_t index,
const char* message, const char *message,
const git_oid *stash_id, const git_oid *stash_id,
void *payload); void *payload);
......
...@@ -59,7 +59,7 @@ static bool hunk_starts_at_or_after_line(git_blame_hunk *hunk, size_t line) ...@@ -59,7 +59,7 @@ static bool hunk_starts_at_or_after_line(git_blame_hunk *hunk, size_t line)
return line <= hunk->final_start_line_number; return line <= hunk->final_start_line_number;
} }
static git_blame_hunk* new_hunk( static git_blame_hunk *new_hunk(
size_t start, size_t start,
size_t lines, size_t lines,
size_t orig_start, size_t orig_start,
...@@ -84,7 +84,7 @@ static void free_hunk(git_blame_hunk *hunk) ...@@ -84,7 +84,7 @@ static void free_hunk(git_blame_hunk *hunk)
git__free(hunk); git__free(hunk);
} }
static git_blame_hunk* dup_hunk(git_blame_hunk *hunk) static git_blame_hunk *dup_hunk(git_blame_hunk *hunk)
{ {
git_blame_hunk *newhunk = new_hunk( git_blame_hunk *newhunk = new_hunk(
hunk->final_start_line_number, hunk->final_start_line_number,
...@@ -122,7 +122,7 @@ static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by) ...@@ -122,7 +122,7 @@ static void shift_hunks_by(git_vector *v, size_t start_line, int shift_by)
} }
} }
git_blame* git_blame__alloc( git_blame *git_blame__alloc(
git_repository *repo, git_repository *repo,
git_blame_options opts, git_blame_options opts,
const char *path) const char *path)
...@@ -299,7 +299,7 @@ static int index_blob_lines(git_blame *blame) ...@@ -299,7 +299,7 @@ static int index_blob_lines(git_blame *blame)
return blame->num_lines; return blame->num_lines;
} }
static git_blame_hunk* hunk_from_entry(git_blame__entry *e, git_blame *blame) static git_blame_hunk *hunk_from_entry(git_blame__entry *e, git_blame *blame)
{ {
git_blame_hunk *h = new_hunk( git_blame_hunk *h = new_hunk(
e->lno+1, e->num_lines, e->s_lno+1, e->suspect->path); e->lno+1, e->num_lines, e->s_lno+1, e->suspect->path);
......
...@@ -429,7 +429,7 @@ static int paths_on_dup(void **old, void *new) ...@@ -429,7 +429,7 @@ static int paths_on_dup(void **old, void *new)
return -1; return -1;
} }
static git_blame__origin* find_origin( static git_blame__origin *find_origin(
git_blame *blame, git_blame *blame,
git_commit *parent, git_commit *parent,
git_blame__origin *origin) git_blame__origin *origin)
......
...@@ -670,7 +670,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...) ...@@ -670,7 +670,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...)
va_start(ap, nbuf); va_start(ap, nbuf);
for (i = 0; i < nbuf; ++i) { for (i = 0; i < nbuf; ++i) {
const char* segment; const char *segment;
size_t segment_len; size_t segment_len;
segment = va_arg(ap, const char *); segment = va_arg(ap, const char *);
...@@ -702,7 +702,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...) ...@@ -702,7 +702,7 @@ int git_buf_join_n(git_buf *buf, char separator, int nbuf, ...)
va_start(ap, nbuf); va_start(ap, nbuf);
for (i = 0; i < nbuf; ++i) { for (i = 0; i < nbuf; ++i) {
const char* segment; const char *segment;
size_t segment_len; size_t segment_len;
segment = va_arg(ap, const char *); segment = va_arg(ap, const char *);
......
...@@ -265,7 +265,7 @@ static int update_head_to_branch( ...@@ -265,7 +265,7 @@ static int update_head_to_branch(
{ {
int retcode; int retcode;
git_buf remote_branch_name = GIT_BUF_INIT; git_buf remote_branch_name = GIT_BUF_INIT;
git_reference* remote_ref = NULL; git_reference *remote_ref = NULL;
git_buf default_branch = GIT_BUF_INIT; git_buf default_branch = GIT_BUF_INIT;
GIT_ASSERT_ARG(remote); GIT_ASSERT_ARG(remote);
......
...@@ -728,7 +728,7 @@ int git_commit_graph_writer_add_revwalk(git_commit_graph_writer *w, git_revwalk ...@@ -728,7 +728,7 @@ int git_commit_graph_writer_add_revwalk(git_commit_graph_writer *w, git_revwalk
git_oid id; git_oid id;
git_repository *repo = git_revwalk_repository(walk); git_repository *repo = git_revwalk_repository(walk);
git_commit *commit; git_commit *commit;
struct packed_commit* packed_commit; struct packed_commit *packed_commit;
while ((git_revwalk_next(&id, walk)) == 0) { while ((git_revwalk_next(&id, walk)) == 0) {
error = git_commit_lookup(&commit, repo, &id); error = git_commit_lookup(&commit, repo, &id);
......
...@@ -511,7 +511,7 @@ int git_config_backend_foreach_match( ...@@ -511,7 +511,7 @@ int git_config_backend_foreach_match(
void *payload) void *payload)
{ {
git_config_entry *entry; git_config_entry *entry;
git_config_iterator* iter; git_config_iterator *iter;
git_regexp regex; git_regexp regex;
int error = 0; int error = 0;
......
...@@ -164,7 +164,7 @@ out: ...@@ -164,7 +164,7 @@ out:
return error; return error;
} }
static void config_file_clear_includes(config_file_backend* cfg) static void config_file_clear_includes(config_file_backend *cfg)
{ {
config_file *include; config_file *include;
uint32_t i; uint32_t i;
...@@ -1104,7 +1104,7 @@ static int write_on_eof( ...@@ -1104,7 +1104,7 @@ static int write_on_eof(
/* /*
* This is pretty much the parsing, except we write out anything we don't have * This is pretty much the parsing, except we write out anything we don't have
*/ */
static int config_file_write(config_file_backend *cfg, const char *orig_key, const char *key, const git_regexp *preg, const char* value) static int config_file_write(config_file_backend *cfg, const char *orig_key, const char *key, const git_regexp *preg, const char *value)
{ {
char *orig_section = NULL, *section = NULL, *orig_name, *name, *ldot; char *orig_section = NULL, *section = NULL, *orig_name, *name, *ldot;
......
...@@ -391,7 +391,7 @@ static int show_suffix( ...@@ -391,7 +391,7 @@ static int show_suffix(
git_buf *buf, git_buf *buf,
int depth, int depth,
git_repository *repo, git_repository *repo,
const git_oid* id, const git_oid *id,
unsigned int abbrev_size) unsigned int abbrev_size)
{ {
int error, size = 0; int error, size = 0;
......
...@@ -1710,7 +1710,7 @@ static void sha1_recompression_step(uint32_t step, uint32_t ihvin[5], uint32_t i ...@@ -1710,7 +1710,7 @@ static void sha1_recompression_step(uint32_t step, uint32_t ihvin[5], uint32_t i
static void sha1_process(SHA1_CTX* ctx, const uint32_t block[16]) static void sha1_process(SHA1_CTX *ctx, const uint32_t block[16])
{ {
unsigned i, j; unsigned i, j;
uint32_t ubc_dv_mask[DVMASKSIZE] = { 0xFFFFFFFF }; uint32_t ubc_dv_mask[DVMASKSIZE] = { 0xFFFFFFFF };
...@@ -1762,7 +1762,7 @@ static void sha1_process(SHA1_CTX* ctx, const uint32_t block[16]) ...@@ -1762,7 +1762,7 @@ static void sha1_process(SHA1_CTX* ctx, const uint32_t block[16])
} }
} }
void SHA1DCInit(SHA1_CTX* ctx) void SHA1DCInit(SHA1_CTX *ctx)
{ {
ctx->total = 0; ctx->total = 0;
ctx->ihv[0] = 0x67452301; ctx->ihv[0] = 0x67452301;
...@@ -1778,7 +1778,7 @@ void SHA1DCInit(SHA1_CTX* ctx) ...@@ -1778,7 +1778,7 @@ void SHA1DCInit(SHA1_CTX* ctx)
ctx->callback = NULL; ctx->callback = NULL;
} }
void SHA1DCSetSafeHash(SHA1_CTX* ctx, int safehash) void SHA1DCSetSafeHash(SHA1_CTX *ctx, int safehash)
{ {
if (safehash) if (safehash)
ctx->safe_hash = 1; ctx->safe_hash = 1;
...@@ -1787,7 +1787,7 @@ void SHA1DCSetSafeHash(SHA1_CTX* ctx, int safehash) ...@@ -1787,7 +1787,7 @@ void SHA1DCSetSafeHash(SHA1_CTX* ctx, int safehash)
} }
void SHA1DCSetUseUBC(SHA1_CTX* ctx, int ubc_check) void SHA1DCSetUseUBC(SHA1_CTX *ctx, int ubc_check)
{ {
if (ubc_check) if (ubc_check)
ctx->ubc_check = 1; ctx->ubc_check = 1;
...@@ -1795,7 +1795,7 @@ void SHA1DCSetUseUBC(SHA1_CTX* ctx, int ubc_check) ...@@ -1795,7 +1795,7 @@ void SHA1DCSetUseUBC(SHA1_CTX* ctx, int ubc_check)
ctx->ubc_check = 0; ctx->ubc_check = 0;
} }
void SHA1DCSetUseDetectColl(SHA1_CTX* ctx, int detect_coll) void SHA1DCSetUseDetectColl(SHA1_CTX *ctx, int detect_coll)
{ {
if (detect_coll) if (detect_coll)
ctx->detect_coll = 1; ctx->detect_coll = 1;
...@@ -1803,7 +1803,7 @@ void SHA1DCSetUseDetectColl(SHA1_CTX* ctx, int detect_coll) ...@@ -1803,7 +1803,7 @@ void SHA1DCSetUseDetectColl(SHA1_CTX* ctx, int detect_coll)
ctx->detect_coll = 0; ctx->detect_coll = 0;
} }
void SHA1DCSetDetectReducedRoundCollision(SHA1_CTX* ctx, int reduced_round_coll) void SHA1DCSetDetectReducedRoundCollision(SHA1_CTX *ctx, int reduced_round_coll)
{ {
if (reduced_round_coll) if (reduced_round_coll)
ctx->reduced_round_coll = 1; ctx->reduced_round_coll = 1;
...@@ -1811,12 +1811,12 @@ void SHA1DCSetDetectReducedRoundCollision(SHA1_CTX* ctx, int reduced_round_coll) ...@@ -1811,12 +1811,12 @@ void SHA1DCSetDetectReducedRoundCollision(SHA1_CTX* ctx, int reduced_round_coll)
ctx->reduced_round_coll = 0; ctx->reduced_round_coll = 0;
} }
void SHA1DCSetCallback(SHA1_CTX* ctx, collision_block_callback callback) void SHA1DCSetCallback(SHA1_CTX *ctx, collision_block_callback callback)
{ {
ctx->callback = callback; ctx->callback = callback;
} }
void SHA1DCUpdate(SHA1_CTX* ctx, const char* buf, size_t len) void SHA1DCUpdate(SHA1_CTX *ctx, const char *buf, size_t len)
{ {
unsigned left, fill; unsigned left, fill;
......
...@@ -1151,7 +1151,7 @@ static void deletes_by_oid_free(git_oidmap *map) { ...@@ -1151,7 +1151,7 @@ static void deletes_by_oid_free(git_oidmap *map) {
git_oidmap_free(map); git_oidmap_free(map);
} }
static int deletes_by_oid_enqueue(git_oidmap *map, git_pool* pool, const git_oid *id, size_t idx) static int deletes_by_oid_enqueue(git_oidmap *map, git_pool *pool, const git_oid *id, size_t idx)
{ {
deletes_by_oid_queue *queue; deletes_by_oid_queue *queue;
size_t *array_entry; size_t *array_entry;
......
...@@ -674,7 +674,7 @@ void git_note_free(git_note *note) ...@@ -674,7 +674,7 @@ void git_note_free(git_note *note)
} }
static int process_entry_path( static int process_entry_path(
const char* entry_path, const char *entry_path,
git_oid *annotated_object_id) git_oid *annotated_object_id)
{ {
int error = 0; int error = 0;
...@@ -796,8 +796,8 @@ cleanup: ...@@ -796,8 +796,8 @@ cleanup:
} }
int git_note_next( int git_note_next(
git_oid* note_id, git_oid *note_id,
git_oid* annotated_id, git_oid *annotated_id,
git_note_iterator *it) git_note_iterator *it)
{ {
int error; int error;
......
...@@ -413,7 +413,7 @@ int git_path_to_dir(git_buf *path) ...@@ -413,7 +413,7 @@ int git_path_to_dir(git_buf *path)
return git_buf_oom(path) ? -1 : 0; return git_buf_oom(path) ? -1 : 0;
} }
void git_path_string_to_dir(char* path, size_t size) void git_path_string_to_dir(char *path, size_t size)
{ {
size_t end = strlen(path); size_t end = strlen(path);
......
...@@ -85,7 +85,7 @@ extern int git_path_to_dir(git_buf *path); ...@@ -85,7 +85,7 @@ extern int git_path_to_dir(git_buf *path);
/** /**
* Ensure string has a trailing '/' if there is space for it. * Ensure string has a trailing '/' if there is space for it.
*/ */
extern void git_path_string_to_dir(char* path, size_t size); extern void git_path_string_to_dir(char *path, size_t size);
/** /**
* Taken from git.git; returns nonzero if the given path is "." or "..". * Taken from git.git; returns nonzero if the given path is "." or "..".
......
...@@ -764,7 +764,7 @@ static bool ref_is_available( ...@@ -764,7 +764,7 @@ static bool ref_is_available(
static int reference_path_available( static int reference_path_available(
refdb_fs_backend *backend, refdb_fs_backend *backend,
const char *new_ref, const char *new_ref,
const char* old_ref, const char *old_ref,
int force) int force)
{ {
size_t i; size_t i;
......
...@@ -249,7 +249,7 @@ int git_reference_dwim(git_reference **out, git_repository *repo, const char *re ...@@ -249,7 +249,7 @@ int git_reference_dwim(git_reference **out, git_repository *repo, const char *re
git_reference *ref; git_reference *ref;
git_buf refnamebuf = GIT_BUF_INIT, name = GIT_BUF_INIT; git_buf refnamebuf = GIT_BUF_INIT, name = GIT_BUF_INIT;
static const char* formatters[] = { static const char *formatters[] = {
"%s", "%s",
GIT_REFS_DIR "%s", GIT_REFS_DIR "%s",
GIT_REFS_TAGS_DIR "%s", GIT_REFS_TAGS_DIR "%s",
...@@ -1246,7 +1246,7 @@ int git_reference_is_note(const git_reference *ref) ...@@ -1246,7 +1246,7 @@ int git_reference_is_note(const git_reference *ref)
return git_reference__is_note(ref->name); return git_reference__is_note(ref->name);
} }
static int peel_error(int error, const git_reference *ref, const char* msg) static int peel_error(int error, const git_reference *ref, const char *msg)
{ {
git_error_set( git_error_set(
GIT_ERROR_INVALID, GIT_ERROR_INVALID,
......
...@@ -359,7 +359,7 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs) ...@@ -359,7 +359,7 @@ int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs)
git_remote_head key; git_remote_head key;
git_refspec *cur; git_refspec *cur;
const char* formatters[] = { const char *formatters[] = {
GIT_REFS_DIR "%s", GIT_REFS_DIR "%s",
GIT_REFS_TAGS_DIR "%s", GIT_REFS_TAGS_DIR "%s",
GIT_REFS_HEADS_DIR "%s", GIT_REFS_HEADS_DIR "%s",
......
...@@ -677,7 +677,7 @@ int git_remote_set_instance_pushurl(git_remote *remote, const char *url) ...@@ -677,7 +677,7 @@ int git_remote_set_instance_pushurl(git_remote *remote, const char *url)
return 0; return 0;
} }
int git_remote_set_pushurl(git_repository *repo, const char *remote, const char* url) int git_remote_set_pushurl(git_repository *repo, const char *remote, const char *url)
{ {
return set_url(repo, remote, CONFIG_PUSHURL_FMT, url); return set_url(repo, remote, CONFIG_PUSHURL_FMT, url);
} }
......
...@@ -2850,8 +2850,8 @@ cleanup: ...@@ -2850,8 +2850,8 @@ cleanup:
} }
int git_repository_set_head( int git_repository_set_head(
git_repository* repo, git_repository *repo,
const char* refname) const char *refname)
{ {
git_reference *ref = NULL, *current = NULL, *new_head = NULL; git_reference *ref = NULL, *current = NULL, *new_head = NULL;
git_buf log_message = GIT_BUF_INIT; git_buf log_message = GIT_BUF_INIT;
...@@ -2900,8 +2900,8 @@ cleanup: ...@@ -2900,8 +2900,8 @@ cleanup:
} }
int git_repository_set_head_detached( int git_repository_set_head_detached(
git_repository* repo, git_repository *repo,
const git_oid* commitish) const git_oid *commitish)
{ {
return detach(repo, commitish, NULL); return detach(repo, commitish, NULL);
} }
...@@ -2916,7 +2916,7 @@ int git_repository_set_head_detached_from_annotated( ...@@ -2916,7 +2916,7 @@ int git_repository_set_head_detached_from_annotated(
return detach(repo, git_annotated_commit_id(commitish), commitish->description); return detach(repo, git_annotated_commit_id(commitish), commitish->description);
} }
int git_repository_detach_head(git_repository* repo) int git_repository_detach_head(git_repository *repo)
{ {
git_reference *old_head = NULL, *new_head = NULL, *current = NULL; git_reference *old_head = NULL, *new_head = NULL, *current = NULL;
git_object *object = NULL; git_object *object = NULL;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
int git_reset_default( int git_reset_default(
git_repository *repo, git_repository *repo,
const git_object *target, const git_object *target,
const git_strarray* pathspecs) const git_strarray *pathspecs)
{ {
git_object *commit = NULL; git_object *commit = NULL;
git_tree *tree = NULL; git_tree *tree = NULL;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "git2.h" #include "git2.h"
static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const char *spec, size_t speclen) static int maybe_sha_or_abbrev(git_object **out, git_repository *repo, const char *spec, size_t speclen)
{ {
git_oid oid; git_oid oid;
...@@ -24,7 +24,7 @@ static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const cha ...@@ -24,7 +24,7 @@ static int maybe_sha_or_abbrev(git_object** out, git_repository *repo, const cha
return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJECT_ANY); return git_object_lookup_prefix(out, repo, &oid, speclen, GIT_OBJECT_ANY);
} }
static int maybe_sha(git_object** out, git_repository *repo, const char *spec) static int maybe_sha(git_object **out, git_repository *repo, const char *spec)
{ {
size_t speclen = strlen(spec); size_t speclen = strlen(spec);
...@@ -34,7 +34,7 @@ static int maybe_sha(git_object** out, git_repository *repo, const char *spec) ...@@ -34,7 +34,7 @@ static int maybe_sha(git_object** out, git_repository *repo, const char *spec)
return maybe_sha_or_abbrev(out, repo, spec, speclen); return maybe_sha_or_abbrev(out, repo, spec, speclen);
} }
static int maybe_abbrev(git_object** out, git_repository *repo, const char *spec) static int maybe_abbrev(git_object **out, git_repository *repo, const char *spec)
{ {
size_t speclen = strlen(spec); size_t speclen = strlen(spec);
...@@ -310,7 +310,7 @@ cleanup: ...@@ -310,7 +310,7 @@ cleanup:
return error; return error;
} }
static int handle_at_syntax(git_object **out, git_reference **ref, const char *spec, size_t identifier_len, git_repository* repo, const char *curly_braces_content) static int handle_at_syntax(git_object **out, git_reference **ref, const char *spec, size_t identifier_len, git_repository *repo, const char *curly_braces_content)
{ {
bool is_numeric; bool is_numeric;
int parsed = 0, error = -1; int parsed = 0, error = -1;
......
...@@ -56,7 +56,7 @@ static int append_abbreviated_oid(git_buf *out, const git_oid *b_commit) ...@@ -56,7 +56,7 @@ static int append_abbreviated_oid(git_buf *out, const git_oid *b_commit)
return git_buf_oom(out) ? -1 : 0; return git_buf_oom(out) ? -1 : 0;
} }
static int append_commit_description(git_buf *out, git_commit* commit) static int append_commit_description(git_buf *out, git_commit *commit)
{ {
const char *summary = git_commit_summary(commit); const char *summary = git_commit_summary(commit);
GIT_ERROR_CHECK_ALLOC(summary); GIT_ERROR_CHECK_ALLOC(summary);
......
...@@ -36,7 +36,7 @@ int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings) ...@@ -36,7 +36,7 @@ int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings)
return 0; return 0;
} }
BIO_METHOD* BIO_meth_new__legacy(int type, const char *name) BIO_METHOD *BIO_meth_new__legacy(int type, const char *name)
{ {
BIO_METHOD *meth = git__calloc(1, sizeof(BIO_METHOD)); BIO_METHOD *meth = git__calloc(1, sizeof(BIO_METHOD));
if (!meth) { if (!meth) {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#if defined(GIT_OPENSSL_LEGACY) || defined(GIT_OPENSSL_DYNAMIC) #if defined(GIT_OPENSSL_LEGACY) || defined(GIT_OPENSSL_DYNAMIC)
extern int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings); extern int OPENSSL_init_ssl__legacy(uint64_t opts, const void *settings);
extern BIO_METHOD* BIO_meth_new__legacy(int type, const char *name); extern BIO_METHOD *BIO_meth_new__legacy(int type, const char *name);
extern void BIO_meth_free__legacy(BIO_METHOD *biom); extern void BIO_meth_free__legacy(BIO_METHOD *biom);
extern int BIO_meth_set_write__legacy(BIO_METHOD *biom, int (*write) (BIO *, const char *, int)); extern int BIO_meth_set_write__legacy(BIO_METHOD *biom, int (*write) (BIO *, const char *, int));
extern int BIO_meth_set_read__legacy(BIO_METHOD *biom, int (*read) (BIO *, char *, int)); extern int BIO_meth_set_read__legacy(BIO_METHOD *biom, int (*read) (BIO *, char *, int));
......
...@@ -258,7 +258,7 @@ static size_t find_trailer_end(const char *buf, size_t len) ...@@ -258,7 +258,7 @@ static size_t find_trailer_end(const char *buf, size_t len)
return len - ignore_non_trailer(buf, len); return len - ignore_non_trailer(buf, len);
} }
static char *extract_trailer_block(const char *message, size_t* len) static char *extract_trailer_block(const char *message, size_t *len)
{ {
size_t patch_start = find_patch_start(message); size_t patch_start = find_patch_start(message);
size_t trailer_end = find_trailer_end(message, patch_start); size_t trailer_end = find_trailer_end(message, patch_start);
......
...@@ -476,11 +476,11 @@ static int request_creds(git_credential **out, ssh_subtransport *t, const char * ...@@ -476,11 +476,11 @@ static int request_creds(git_credential **out, ssh_subtransport *t, const char *
} }
static int _git_ssh_session_create( static int _git_ssh_session_create(
LIBSSH2_SESSION** session, LIBSSH2_SESSION **session,
git_stream *io) git_stream *io)
{ {
int rc = 0; int rc = 0;
LIBSSH2_SESSION* s; LIBSSH2_SESSION *s;
git_socket_stream *socket = GIT_CONTAINER_OF(io, git_socket_stream, parent); git_socket_stream *socket = GIT_CONTAINER_OF(io, git_socket_stream, parent);
GIT_ASSERT_ARG(session); GIT_ASSERT_ARG(session);
...@@ -521,8 +521,8 @@ static int _git_ssh_setup_conn( ...@@ -521,8 +521,8 @@ static int _git_ssh_setup_conn(
size_t i; size_t i;
ssh_stream *s; ssh_stream *s;
git_credential *cred = NULL; git_credential *cred = NULL;
LIBSSH2_SESSION* session=NULL; LIBSSH2_SESSION *session=NULL;
LIBSSH2_CHANNEL* channel=NULL; LIBSSH2_CHANNEL *channel=NULL;
t->current_stream = NULL; t->current_stream = NULL;
......
...@@ -250,7 +250,7 @@ static int acquire_fallback_cred( ...@@ -250,7 +250,7 @@ static int acquire_fallback_cred(
hCoInitResult = CoInitializeEx(NULL, COINIT_MULTITHREADED); hCoInitResult = CoInitializeEx(NULL, COINIT_MULTITHREADED);
if (SUCCEEDED(hCoInitResult) || hCoInitResult == RPC_E_CHANGED_MODE) { if (SUCCEEDED(hCoInitResult) || hCoInitResult == RPC_E_CHANGED_MODE) {
IInternetSecurityManager* pISM; IInternetSecurityManager *pISM;
/* And if the target URI is in the My Computer, Intranet, or Trusted zones */ /* And if the target URI is in the My Computer, Intranet, or Trusted zones */
if (SUCCEEDED(CoCreateInstance(&CLSID_InternetSecurityManager, NULL, if (SUCCEEDED(CoCreateInstance(&CLSID_InternetSecurityManager, NULL,
......
...@@ -49,7 +49,7 @@ static int win32_path_to_8(git_buf *dest, const wchar_t *src) ...@@ -49,7 +49,7 @@ static int win32_path_to_8(git_buf *dest, const wchar_t *src)
return git_buf_sets(dest, utf8_path); return git_buf_sets(dest, utf8_path);
} }
static wchar_t* win32_walkpath(wchar_t *path, wchar_t *buf, size_t buflen) static wchar_t *win32_walkpath(wchar_t *path, wchar_t *buf, size_t buflen)
{ {
wchar_t term, *base = path; wchar_t term, *base = path;
......
...@@ -23,7 +23,7 @@ typedef SOCKET GIT_SOCKET; ...@@ -23,7 +23,7 @@ typedef SOCKET GIT_SOCKET;
extern int p_fstat(int fd, struct stat *buf); extern int p_fstat(int fd, struct stat *buf);
extern int p_lstat(const char *file_name, struct stat *buf); extern int p_lstat(const char *file_name, struct stat *buf);
extern int p_stat(const char* path, struct stat *buf); extern int p_stat(const char *path, struct stat *buf);
extern int p_utimes(const char *filename, const struct p_timeval times[2]); extern int p_utimes(const char *filename, const struct p_timeval times[2]);
extern int p_futimes(int fd, const struct p_timeval times[2]); extern int p_futimes(int fd, const struct p_timeval times[2]);
...@@ -38,15 +38,15 @@ extern char *p_realpath(const char *orig_path, char *buffer); ...@@ -38,15 +38,15 @@ extern char *p_realpath(const char *orig_path, char *buffer);
extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags); extern int p_recv(GIT_SOCKET socket, void *buffer, size_t length, int flags);
extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags); extern int p_send(GIT_SOCKET socket, const void *buffer, size_t length, int flags);
extern int p_inet_pton(int af, const char* src, void* dst); extern int p_inet_pton(int af, const char *src, void* dst);
extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr); extern int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr);
extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4); extern int p_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
extern int p_mkstemp(char *tmp_path); extern int p_mkstemp(char *tmp_path);
extern int p_chdir(const char* path); extern int p_chdir(const char *path);
extern int p_chmod(const char* path, mode_t mode); extern int p_chmod(const char *path, mode_t mode);
extern int p_rmdir(const char* path); extern int p_rmdir(const char *path);
extern int p_access(const char* path, mode_t mode); extern int p_access(const char *path, mode_t mode);
extern int p_ftruncate(int fd, off64_t size); extern int p_ftruncate(int fd, off64_t size);
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of /* p_lstat is almost but not quite POSIX correct. Specifically, the use of
......
...@@ -690,7 +690,7 @@ static int getfinalpath_w( ...@@ -690,7 +690,7 @@ static int getfinalpath_w(
return (int)git_win32_path_remove_namespace(dest, dwChars); return (int)git_win32_path_remove_namespace(dest, dwChars);
} }
static int follow_and_lstat_link(git_win32_path path, struct stat* buf) static int follow_and_lstat_link(git_win32_path path, struct stat *buf)
{ {
git_win32_path target_w; git_win32_path target_w;
...@@ -716,7 +716,7 @@ int p_fstat(int fd, struct stat *buf) ...@@ -716,7 +716,7 @@ int p_fstat(int fd, struct stat *buf)
return 0; return 0;
} }
int p_stat(const char* path, struct stat* buf) int p_stat(const char *path, struct stat *buf)
{ {
git_win32_path path_w; git_win32_path path_w;
int len; int len;
...@@ -733,7 +733,7 @@ int p_stat(const char* path, struct stat* buf) ...@@ -733,7 +733,7 @@ int p_stat(const char* path, struct stat* buf)
return 0; return 0;
} }
int p_chdir(const char* path) int p_chdir(const char *path)
{ {
git_win32_path buf; git_win32_path buf;
...@@ -743,7 +743,7 @@ int p_chdir(const char* path) ...@@ -743,7 +743,7 @@ int p_chdir(const char* path)
return _wchdir(buf); return _wchdir(buf);
} }
int p_chmod(const char* path, mode_t mode) int p_chmod(const char *path, mode_t mode)
{ {
git_win32_path buf; git_win32_path buf;
...@@ -753,7 +753,7 @@ int p_chmod(const char* path, mode_t mode) ...@@ -753,7 +753,7 @@ int p_chmod(const char* path, mode_t mode)
return _wchmod(buf, mode); return _wchmod(buf, mode);
} }
int p_rmdir(const char* path) int p_rmdir(const char *path)
{ {
git_win32_path buf; git_win32_path buf;
int error; int error;
...@@ -873,7 +873,7 @@ int p_mkstemp(char *tmp_path) ...@@ -873,7 +873,7 @@ int p_mkstemp(char *tmp_path)
return p_open(tmp_path, O_RDWR | O_CREAT | O_EXCL, 0744); /* -V536 */ return p_open(tmp_path, O_RDWR | O_CREAT | O_EXCL, 0744); /* -V536 */
} }
int p_access(const char* path, mode_t mode) int p_access(const char *path, mode_t mode)
{ {
git_win32_path buf; git_win32_path buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment