summaryrefslogtreecommitdiff
path: root/src/pack.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2011-08-25 14:22:57 +0300
committerKirill A. Shutemov <kirill@shutemov.name>2011-08-25 16:41:15 +0300
commit932669b8655851cc18ca109e78dfe8d71c0b31c0 (patch)
tree2a0cdabf777d541ffcaee30d57d2071dff406a1d /src/pack.c
parenta7e34e3c854aaed77ede8558ff253716bc4c80a2 (diff)
downloadlibgit2-932669b8655851cc18ca109e78dfe8d71c0b31c0.tar.gz
Drop STRLEN() macros
There is no need in STRLEN macros. Compilers can do this trivial optimization on its own. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pack.c b/src/pack.c
index 4b43e7cf1..d882516be 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -196,7 +196,7 @@ static int pack_index_open(struct git_pack_file *p)
return GIT_SUCCESS;
idx_name = git__strdup(p->pack_name);
- strcpy(idx_name + strlen(idx_name) - STRLEN(".pack"), ".idx");
+ strcpy(idx_name + strlen(idx_name) - strlen(".pack"), ".idx");
error = pack_index_check(idx_name, p);
free(idx_name);
@@ -614,7 +614,7 @@ int git_packfile_check(struct git_pack_file **pack_out, const char *path)
* Make sure a corresponding .pack file exists and that
* the index looks sane.
*/
- path_len -= STRLEN(".idx");
+ path_len -= strlen(".idx");
if (path_len < 1) {
free(p);
return git__throw(GIT_ENOTFOUND, "Failed to check packfile. Wrong path name");