summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-06-30 19:52:34 +0300
committerVicent Marti <tanoku@gmail.com>2011-07-01 18:02:56 +0200
commit932d1baf294aaacfd5a99e7758a3c08d8ffc22ab (patch)
treee6714d92345ed9a916d8cd771ab1588333d41998 /src
parent1f4f4d17046e43ca24da9621323d921ae0d0f5dd (diff)
downloadlibgit2-932d1baf294aaacfd5a99e7758a3c08d8ffc22ab.tar.gz
cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'src')
-rw-r--r--src/filebuf.c2
-rw-r--r--src/fileops.c4
-rw-r--r--src/fileops.h20
-rw-r--r--src/hashtable.c10
-rw-r--r--src/hashtable.h2
-rw-r--r--src/index.c2
-rw-r--r--src/odb.c2
-rw-r--r--src/odb_pack.c12
-rw-r--r--src/oid.c2
-rw-r--r--src/pqueue.c2
-rw-r--r--src/pqueue.h2
-rw-r--r--src/refs.c28
-rw-r--r--src/repository.c10
-rw-r--r--src/signature.c10
-rw-r--r--src/tag.c28
-rw-r--r--src/tree.c20
-rw-r--r--src/util.c16
-rw-r--r--src/util.h8
-rw-r--r--src/vector.c2
19 files changed, 91 insertions, 91 deletions
diff --git a/src/filebuf.c b/src/filebuf.c
index 01b36bcff..ea5599b6d 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -200,7 +200,7 @@ int git_filebuf_open(git_filebuf *file, const char *path, int flags)
char tmp_path[GIT_PATH_MAX];
/* Open the file as temporary for locking */
- file->fd = gitfo_mktemp(tmp_path, path);
+ file->fd = gitfo_mktemp(tmp_path, path);
if (file->fd < 0) {
error = GIT_EOSERR;
goto cleanup;
diff --git a/src/fileops.c b/src/fileops.c
index 936a6b4cc..3f0198dc4 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -475,7 +475,7 @@ int gitfo_prettify_dir_path(char *buffer_out, size_t size, const char *path, con
current++;
continue;
}
-
+
only_dots = 1;
segment_len = 0;
@@ -753,7 +753,7 @@ int gitfo_hide_directory__w32(const char *path)
error = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN) != 0 ?
GIT_SUCCESS : GIT_ERROR; /* MSDN states a "non zero" value indicates a success */
- if (error < GIT_SUCCESS)
+ if (error < GIT_SUCCESS)
error = git__throw(GIT_EOSERR, "Failed to hide directory '%s'", path);
return error;
diff --git a/src/fileops.h b/src/fileops.h
index 229f6c4d7..d9fa96008 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -165,10 +165,10 @@ extern int gitfo_getcwd(char *buffer_out, size_t size);
/**
* Clean up a provided absolute or relative directory path.
- *
- * This prettification relies on basic operations such as coalescing
- * multiple forward slashes into a single slash, removing '.' and
- * './' current directory segments, and removing parent directory
+ *
+ * This prettification relies on basic operations such as coalescing
+ * multiple forward slashes into a single slash, removing '.' and
+ * './' current directory segments, and removing parent directory
* whenever '..' is encountered.
*
* If not empty, the returned path ends with a forward slash.
@@ -176,7 +176,7 @@ extern int gitfo_getcwd(char *buffer_out, size_t size);
* For instance, this will turn "d1/s1///s2/..//../s3" into "d1/s3/".
*
* This only performs a string based analysis of the path.
- * No checks are done to make sure the path actually makes sense from
+ * No checks are done to make sure the path actually makes sense from
* the file system perspective.
*
* @param buffer_out buffer to populate with the normalized path.
@@ -190,16 +190,16 @@ int gitfo_prettify_dir_path(char *buffer_out, size_t size, const char *path, con
/**
* Clean up a provided absolute or relative file path.
- *
- * This prettification relies on basic operations such as coalescing
- * multiple forward slashes into a single slash, removing '.' and
- * './' current directory segments, and removing parent directory
+ *
+ * This prettification relies on basic operations such as coalescing
+ * multiple forward slashes into a single slash, removing '.' and
+ * './' current directory segments, and removing parent directory
* whenever '..' is encountered.
*
* For instance, this will turn "d1/s1///s2/..//../s3" into "d1/s3".
*
* This only performs a string based analysis of the path.
- * No checks are done to make sure the path actually makes sense from
+ * No checks are done to make sure the path actually makes sense from
* the file system perspective.
*
* @param buffer_out buffer to populate with the normalized path.
diff --git a/src/hashtable.c b/src/hashtable.c
index b40737d67..86e5a113a 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -94,22 +94,22 @@ static void node_swap_with(git_hashtable_node *self, git_hashtable_node *other)
}
static int node_insert(git_hashtable *self, git_hashtable_node *new_node)
-{
+{
int iteration, hash_id;
- for (iteration = 0; iteration < MAX_LOOPS; iteration++) {
+ for (iteration = 0; iteration < MAX_LOOPS; iteration++) {
for (hash_id = 0; hash_id < GIT_HASHTABLE_HASHES; ++hash_id) {
git_hashtable_node *node;
node = node_with_hash(self, new_node->key, hash_id);
node_swap_with(new_node, node);
if(new_node->key == 0x0){
self->key_count++;
- return GIT_SUCCESS;
+ return GIT_SUCCESS;
}
}
}
- if (self->is_resizing)
+ if (self->is_resizing)
return git__throw(GIT_EBUSY, "Failed to insert node. Hashtable is currently resizing");
resize_to(self, self->size * 2);
@@ -130,7 +130,7 @@ static int insert_nodes(git_hashtable *self, git_hashtable_node *old_nodes, size
return GIT_SUCCESS;
}
-git_hashtable *git_hashtable_alloc(size_t min_size,
+git_hashtable *git_hashtable_alloc(size_t min_size,
git_hash_ptr hash,
git_hash_keyeq_ptr key_eq)
{
diff --git a/src/hashtable.h b/src/hashtable.h
index c3475b6ed..3a4e6a7e3 100644
--- a/src/hashtable.h
+++ b/src/hashtable.h
@@ -31,7 +31,7 @@ struct git_hashtable {
typedef struct git_hashtable_node git_hashtable_node;
typedef struct git_hashtable git_hashtable;
-git_hashtable *git_hashtable_alloc(size_t min_size,
+git_hashtable *git_hashtable_alloc(size_t min_size,
git_hash_ptr hash,
git_hash_keyeq_ptr key_eq);
void *git_hashtable_lookup(git_hashtable *h, const void *key);
diff --git a/src/index.c b/src/index.c
index 23fd52e09..ed91e050c 100644
--- a/src/index.c
+++ b/src/index.c
@@ -549,7 +549,7 @@ static int read_tree_internal(git_index_tree **out,
if (count == -1) {
/* FIXME: return buffer_end or the end position for
* this single tree entry */
- *buffer_in = buffer_end;
+ *buffer_in = buffer_end;
*out = NULL;
free_tree(tree); /* Needs to be done manually */
return GIT_SUCCESS;
diff --git a/src/odb.c b/src/odb.c
index 131093b83..0ee790e14 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -620,7 +620,7 @@ int git_odb_open_wstream(git_odb_stream **stream, git_odb *db, size_t size, git_
return git__rethrow(error, "Failed to open write stream");
}
-int git_odb_open_rstream(git_odb_stream **stream, git_odb *db, const git_oid *oid)
+int git_odb_open_rstream(git_odb_stream **stream, git_odb *db, const git_oid *oid)
{
unsigned int i;
int error = GIT_ERROR;
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 2328f527c..2f95faee5 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -227,7 +227,7 @@ struct pack_backend {
-
+
/***********************************************************
*
* FORWARD DECLARATIONS
@@ -306,7 +306,7 @@ static off_t get_delta_base(struct pack_backend *backend,
static unsigned long packfile_unpack_header1(
size_t *sizep,
- git_otype *type,
+ git_otype *type,
const unsigned char *buf,
unsigned long len);
@@ -807,7 +807,7 @@ static int packfile_open(struct pack_file *p)
if (git_oid_cmp(&sha1, (git_oid *)idx_sha1) != 0)
goto cleanup;
- return GIT_SUCCESS;
+ return GIT_SUCCESS;
cleanup:
gitfo_close(p->pack_fd);
@@ -1068,7 +1068,7 @@ static int pack_entry_find1(
return git__rethrow(error, "Failed to find pack entry. Couldn't find offset");
/* we found a unique entry in the index;
- * make sure the packfile backing the index
+ * make sure the packfile backing the index
* still exists on disk */
if (p->pack_fd == -1 && packfile_open(p) < GIT_SUCCESS)
return git__throw(GIT_EOSERR, "Failed to find pack entry. Packfile doesn't exist on disk");
@@ -1177,7 +1177,7 @@ static int pack_entry_find_prefix(
static unsigned long packfile_unpack_header1(
size_t *sizep,
- git_otype *type,
+ git_otype *type,
const unsigned char *buf,
unsigned long len)
{
@@ -1385,7 +1385,7 @@ static int packfile_unpack(
size_t size = 0;
git_otype type;
- /*
+ /*
* TODO: optionally check the CRC on the packfile
*/
diff --git a/src/oid.c b/src/oid.c
index 70dd7c597..1f4a652c9 100644
--- a/src/oid.c
+++ b/src/oid.c
@@ -305,7 +305,7 @@ void git_oid_shorten_free(git_oid_shorten *os)
*
* - Each normal node points to 16 children (one for each possible
* character in the oid). This is *not* stored in an array of
- * pointers, because in a 64-bit arch this would be sucking
+ * pointers, because in a 64-bit arch this would be sucking
* 16*sizeof(void*) = 128 bytes of memory per node, which is fucking
* insane. What we do is store Node Indexes, and use these indexes
* to look up each node in the om->index array. These indexes are
diff --git a/src/pqueue.c b/src/pqueue.c
index 6307175e3..9883a35d8 100644
--- a/src/pqueue.c
+++ b/src/pqueue.c
@@ -11,7 +11,7 @@
* Copyright 2010 Volkan Yazıcı <volkan.yazici@gmail.com>
* Copyright 2006-2010 The Apache Software Foundation
*
- * This file is licensed under the Apache 2.0 license, which
+ * This file is licensed under the Apache 2.0 license, which
* supposedly makes it compatible with the GPLv2 that libgit2 uses.
*
* Check the Apache license at:
diff --git a/src/pqueue.h b/src/pqueue.h
index 7a1394803..ef8362c33 100644
--- a/src/pqueue.h
+++ b/src/pqueue.h
@@ -11,7 +11,7 @@
* Copyright 2010 Volkan Yazıcı <volkan.yazici@gmail.com>
* Copyright 2006-2010 The Apache Software Foundation
*
- * This file is licensed under the Apache 2.0 license, which
+ * This file is licensed under the Apache 2.0 license, which
* supposedly makes it compatible with the GPLv2 that libgit2 uses.
*
* Check the Apache license at:
diff --git a/src/refs.c b/src/refs.c
index 1bb385c32..ad81bb3c1 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -51,7 +51,7 @@ static uint32_t reftable_hash(const void *key, int hash_id)
static uint32_t hash_seeds[GIT_HASHTABLE_HASHES] = {
2147483647,
0x5d20bb23,
- 0x7daaab3c
+ 0x7daaab3c
};
return git__hash(key, strlen((const char *)key), hash_seeds[hash_id]);
@@ -230,9 +230,9 @@ static int loose_parse_symbolic(git_reference *ref, gitfo_buf *file_content)
return git__throw(GIT_EOBJCORRUPTED,
"Failed to parse loose reference. Object too short");
- /*
+ /*
* Assume we have already checked for the header
- * before calling this function
+ * before calling this function
*/
refname_start += header_len;
@@ -303,8 +303,8 @@ static git_rtype loose_guess_rtype(const char *full_path)
}
static int loose_lookup(
- git_reference **ref_out,
- git_repository *repo,
+ git_reference **ref_out,
+ git_repository *repo,
const char *name,
int skip_symbolic)
{
@@ -405,7 +405,7 @@ unlock:
static int packed_parse_peel(
reference_oid *tag_ref,
- const char **buffer_out,
+ const char **buffer_out,
const char *buffer_end)
{
const char *buffer = *buffer_out + 1;
@@ -525,7 +525,7 @@ static int packed_load(git_repository *repo)
git_hashtable_clear(repo->references.packfile);
} else {
ref_cache->packfile = git_hashtable_alloc(
- default_table_size,
+ default_table_size,
reftable_hash,
(git_hash_keyeq_ptr)strcmp);
@@ -680,7 +680,7 @@ static int packed_loadloose(git_repository *repository)
/*
* Load all the loose files from disk into the Packfile table.
* This will overwrite any old packed entries with their
- * updated loose versions
+ * updated loose versions
*/
return gitfo_dirent(refs_path, GIT_PATH_MAX, _dirent_loose_load, repository);
}
@@ -696,7 +696,7 @@ static int packed_write_ref(reference_oid *ref, git_filebuf *file)
git_oid_fmt(oid, &ref->oid);
oid[GIT_OID_HEXSZ] = 0;
- /*
+ /*
* For references that peel to an object in the repo, we must
* write the resulting peel on a separate line, e.g.
*
@@ -722,7 +722,7 @@ static int packed_write_ref(reference_oid *ref, git_filebuf *file)
/*
* Find out what object this reference resolves to.
*
- * For references that point to a 'big' tag (e.g. an
+ * For references that point to a 'big' tag (e.g. an
* actual tag object on the repository), we need to
* cache on the packfile the OID of the object to
* which that 'big tag' is pointing to.
@@ -998,7 +998,7 @@ int git_reference_lookup(git_reference **ref_out, git_repository *repo, const ch
/*
* If we cannot find a loose reference, we look into the packfile
- * Load the packfile first if it hasn't been loaded
+ * Load the packfile first if it hasn't been loaded
*/
/* load all the packed references */
error = packed_load(repo);
@@ -1234,7 +1234,7 @@ int git_reference_set_oid(git_reference *ref, const git_oid *id)
git_oid_cpy(&ref_oid->oid, id);
ref->type &= ~GIT_REF_HAS_PEEL;
- error = loose_write(ref);
+ error = loose_write(ref);
if (error < GIT_SUCCESS)
goto cleanup;
@@ -1445,7 +1445,7 @@ int git_reference_delete(git_reference *ref)
/* load the existing packfile */
if ((error = packed_load(ref->owner)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to delete reference");
-
+
if (git_hashtable_remove(ref->owner->references.packfile, ref->name) < GIT_SUCCESS)
return git__throw(GIT_ENOTFOUND, "Reference not found");
@@ -1482,7 +1482,7 @@ int git_reference_resolve(git_reference **resolved_ref, git_reference *ref)
if ((error = loose_update(ref)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to resolve reference");
-
+
repo = ref->owner;
for (i = 0; i < MAX_NESTING_LEVEL; ++i) {
diff --git a/src/repository.c b/src/repository.c
index e0927c077..8ebfd6745 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -118,7 +118,7 @@ static int assign_repository_dirs(
if (repo->path_index == NULL)
return GIT_ENOMEM;
}
-
+
return GIT_SUCCESS;
}
@@ -207,8 +207,8 @@ int git_repository_open3(git_repository **repo_out,
if (repo == NULL)
return GIT_ENOMEM;
- error = assign_repository_dirs(repo,
- git_dir,
+ error = assign_repository_dirs(repo,
+ git_dir,
NULL,
git_index_file,
git_work_tree);
@@ -247,7 +247,7 @@ int git_repository_open2(git_repository **repo_out,
return GIT_ENOMEM;
error = assign_repository_dirs(repo,
- git_dir,
+ git_dir,
git_object_directory,
git_index_file,
git_work_tree);
@@ -711,7 +711,7 @@ int git_repository_init(git_repository **repo_out, const char *path, unsigned is
int error = GIT_SUCCESS;
git_repository *repo = NULL;
repo_init results;
-
+
assert(repo_out && path);
results.path_repository = NULL;
diff --git a/src/signature.c b/src/signature.c
index 78cb78614..7d2333624 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -107,7 +107,7 @@ static int parse_timezone_offset(const char *buffer, long *offset_out)
const char *offset_start;
const char *offset_end;
- //we are sure that *buffer == ' '
+ //we are sure that *buffer == ' '
offset_start = buffer + 1;
if (*offset_start == '\n') {
@@ -133,7 +133,7 @@ static int parse_timezone_offset(const char *buffer, long *offset_out)
hours = dec_offset / 100;
mins = dec_offset % 100;
- if (hours > 14) // see http://www.worldtimezone.com/faq.html
+ if (hours > 14) // see http://www.worldtimezone.com/faq.html
return git__throw(GIT_EOBJCORRUPTED, "Failed to parse TZ offset. Hour value too large");
if (mins > 59)
@@ -143,7 +143,7 @@ static int parse_timezone_offset(const char *buffer, long *offset_out)
if (offset_start[0] == '-')
offset *= -1;
-
+
*offset_out = offset;
return GIT_SUCCESS;
@@ -218,7 +218,7 @@ int git_signature__parse(git_signature *sig, const char **buffer_out,
if (parse_timezone_offset(buffer, &offset) < GIT_SUCCESS)
return git__throw(GIT_EOBJCORRUPTED, "Failed to parse signature. Could not parse timezone offset");
-
+
sig->when.offset = offset;
*buffer_out = (line_end + 1);
@@ -234,7 +234,7 @@ int git_signature__write(char **signature, const char *header, const git_signatu
offset = sig->when.offset;
sign = (sig->when.offset < 0) ? '-' : '+';
-
+
if (offset < 0)
offset = -offset;
diff --git a/src/tag.c b/src/tag.c
index 45450b933..53e28f526 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -205,7 +205,7 @@ int git_tag_create(
return git__throw(GIT_EINVALIDARGS, "The given target does not belong to this repository");
error = retreive_tag_reference(&new_ref, ref_name, repo, tag_name);
-
+
switch (error) {
case GIT_SUCCESS:
case GIT_ENOTFOUND:
@@ -215,7 +215,7 @@ int git_tag_create(
return git__rethrow(error, "Failed to create tag");
}
- /** Ensure the tag name doesn't conflict with an already existing
+ /** Ensure the tag name doesn't conflict with an already existing
* reference unless overwriting has explictly been requested **/
if (new_ref != NULL) {
if (!allow_ref_overwrite) {
@@ -268,7 +268,7 @@ int git_tag_create(
error = git_reference_create_oid(&new_ref, repo, ref_name, oid, 0);
else
error = git_reference_set_oid(new_ref, oid);
-
+
return error == GIT_SUCCESS ? GIT_SUCCESS : git__rethrow(error, "Failed to create tag");
}
@@ -278,14 +278,14 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
int error, should_update_ref = 0;
git_odb_stream *stream;
git_odb_object *target_obj;
-
+
git_reference *new_ref;
char ref_name[GIT_REFNAME_MAX];
-
+
assert(oid && buffer);
-
+
memset(&tag, 0, sizeof(tag));
-
+
/* validate the buffer */
if ((error = parse_tag_buffer(&tag, buffer, buffer + strlen(buffer))) < GIT_SUCCESS)
return git__rethrow(error, "Failed to create tag");
@@ -298,7 +298,7 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
return git__throw(error, "The type for the given target is invalid");
git_odb_object_close(target_obj);
-
+
error = retreive_tag_reference(&new_ref, ref_name, repo, tag.tag_name);
switch (error) {
@@ -320,16 +320,16 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
should_update_ref = 1;
}
}
-
+
/* write the buffer */
if ((error = git_odb_open_wstream(&stream, repo->db, strlen(buffer), GIT_OBJ_TAG)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to create tag");
-
+
stream->write(stream, buffer, strlen(buffer));
-
+
error = stream->finalize_write(oid, stream);
stream->free(stream);
-
+
if (error < GIT_SUCCESS)
return git__rethrow(error, "Failed to create tag");
@@ -337,11 +337,11 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
error = git_reference_create_oid(&new_ref, repo, ref_name, oid, 0);
else
error = git_reference_set_oid(new_ref, oid);
-
+
git_signature_free(tag.tagger);
free(tag.tag_name);
free(tag.message);
-
+
return error == GIT_SUCCESS ? GIT_SUCCESS : git__rethrow(error, "Failed to create tag");
}
diff --git a/src/tree.c b/src/tree.c
index 2c10ab8a4..6a21709f5 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -34,7 +34,7 @@
#define MAX_FILEMODE_BYTES 6
static int valid_attributes(const int attributes) {
- return attributes >= 0 && attributes <= MAX_FILEMODE;
+ return attributes >= 0 && attributes <= MAX_FILEMODE;
}
int entry_search_cmp(const void *key, const void *array_member)
@@ -47,7 +47,7 @@ int entry_search_cmp(const void *key, const void *array_member)
#if 0
static int valid_attributes(const int attributes) {
- return attributes >= 0 && attributes <= MAX_FILEMODE;
+ return attributes >= 0 && attributes <= MAX_FILEMODE;
}
#endif
@@ -215,9 +215,9 @@ static int write_index(git_oid *oid, git_index *index, const char *base, int bas
buffer = git__malloc(size);
if (buffer == NULL)
return GIT_ENOMEM;
-
+
offset = 0;
-
+
for (nr = entry_no; nr < maxentries; ++nr) {
git_index_entry *entry = git_index_get(index, nr);
@@ -227,11 +227,11 @@ static int write_index(git_oid *oid, git_index *index, const char *base, int bas
unsigned int write_mode;
git_oid subtree_oid;
git_oid *write_oid;
-
+
/* Did we hit the end of the directory? Return how many we wrote */
if (baselen >= pathlen || memcmp(base, pathname, baselen) != 0)
break;
-
+
/* Do we have _further_ subdirectories? */
filename = pathname + baselen;
dirname = strchr(filename, '/');
@@ -254,9 +254,9 @@ static int write_index(git_oid *oid, git_index *index, const char *base, int bas
free(buffer);
return subdir_written;
}
-
+
nr = subdir_written - 1;
-
+
/* Now we need to write out the directory entry into this tree.. */
pathlen = dirname - pathname;
write_oid = &subtree_oid;
@@ -267,14 +267,14 @@ static int write_index(git_oid *oid, git_index *index, const char *base, int bas
if (offset + entrylen + 32 > size) {
size = alloc_nr(offset + entrylen + 32);
buffer = git__realloc(buffer, size);
-
+
if (buffer == NULL)
return GIT_ENOMEM;
}
offset += write_index_entry(buffer + offset, write_mode, filename, entrylen, write_oid);
}
-
+
error = git_odb_write(oid, index->repository->db, buffer, offset, GIT_OBJ_TREE);
free(buffer);
diff --git a/src/util.c b/src/util.c
index f36cce5fe..b654e08d1 100644
--- a/src/util.c
+++ b/src/util.c
@@ -427,17 +427,17 @@ uint32_t git__hash(const void *key, int len, unsigned int seed)
while(len >= 4) {
uint32_t k = *(uint32_t *)data;
- k *= m;
- k ^= k >> r;
- k *= m;
-
- h *= m;
+ k *= m;
+ k ^= k >> r;
+ k *= m;
+
+ h *= m;
h ^= k;
data += 4;
len -= 4;
}
-
+
switch(len) {
case 3: h ^= data[2] << 16;
case 2: h ^= data[1] << 8;
@@ -450,7 +450,7 @@ uint32_t git__hash(const void *key, int len, unsigned int seed)
h ^= h >> 15;
return h;
-}
+}
#else
/*
Cross-platform version of Murmurhash3
@@ -508,5 +508,5 @@ uint32_t git__hash(const void *key, int len, uint32_t seed)
h1 ^= h1 >> 16;
return h1;
-}
+}
#endif
diff --git a/src/util.h b/src/util.h
index c81dd7897..999c3b8aa 100644
--- a/src/util.h
+++ b/src/util.h
@@ -5,7 +5,7 @@
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
#define MSB(x, bits) ((x) & (~0ULL << (bitsizeof(x) - (bits))))
-/*
+/*
* Custom memory allocation wrappers
* that set error code and error message
* on allocation failure
@@ -78,7 +78,7 @@ extern int git__strtol32(long *n, const char *buff, const char **end_buf, int ba
* the string ".". If path is a null pointer or points to an empty string,
* dirname() shall return a pointer to the string "." .
*
- * The `git__dirname` implementation is thread safe. The returned
+ * The `git__dirname` implementation is thread safe. The returned
* string must be manually free'd.
*
* The `git__dirname_r` implementation expects a string allocated
@@ -96,7 +96,7 @@ extern int git__dirname_r(char *buffer, size_t bufflen, const char *path);
* Trailing slashes and backslashes are significant: the basename of
* c:/foo/bar/ is an empty string after the rightmost slash.
*
- * The `git__basename` implementation is thread safe. The returned
+ * The `git__basename` implementation is thread safe. The returned
* string must be manually free'd.
*
* The `git__basename_r` implementation expects a string allocated
@@ -112,7 +112,7 @@ extern const char *git__topdir(const char *path);
* middle slashes and everything
*
* The paths are joined together into buffer_out; this is expected
- * to be an user allocated buffer of `GIT_PATH_MAX` size
+ * to be an user allocated buffer of `GIT_PATH_MAX` size
*/
extern void git__joinpath_n(char *buffer_out, int npath, ...);
diff --git a/src/vector.c b/src/vector.c
index 1ddc26e3e..0451eb082 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -61,7 +61,7 @@ int git_vector_init(git_vector *v, unsigned int initial_size, git_vector_cmp cmp
v->_alloc_size = initial_size;
v->_cmp = cmp;
-
+
v->length = 0;
v->sorted = 1;