diff options
author | J. David Ibáñez <jdavid.ibp@gmail.com> | 2011-09-30 19:41:29 +0200 |
---|---|---|
committer | J. David Ibáñez <jdavid.ibp@gmail.com> | 2011-09-30 19:41:29 +0200 |
commit | 6d8d3f195c9377a1fdb3cbde32ec4a677d93b588 (patch) | |
tree | 189acca649d1754f5673515f7392a6fa09ba6caa /src/oid.c | |
parent | e724b058b2fd3d3b58291205bb7aeeccc55c21c4 (diff) | |
download | libgit2-6d8d3f195c9377a1fdb3cbde32ec4a677d93b588.tar.gz |
oid: optimize git_oid_fromstrn by using memset
Signed-off-by: J. David Ibáñez <jdavid.ibp@gmail.com>
Diffstat (limited to 'src/oid.c')
-rw-r--r-- | src/oid.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -55,8 +55,7 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length) p += 2; } - for (; p < GIT_OID_HEXSZ; p += 2) - out->id[p / 2] = 0x0; + memset(out->id + p / 2, 0, (GIT_OID_HEXSZ - p) / 2); return GIT_SUCCESS; } |