Commit 7b2f94bf by Edward Thomson

attr: use GIT_ASSERT

parent c6e84bce
...@@ -58,7 +58,9 @@ int git_attr_get( ...@@ -58,7 +58,9 @@ int git_attr_get(
git_attr_rule *rule; git_attr_rule *rule;
git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN; git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN;
assert(value && repo && name); GIT_ASSERT_ARG(value);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(name);
*value = NULL; *value = NULL;
...@@ -123,7 +125,10 @@ int git_attr_get_many_with_session( ...@@ -123,7 +125,10 @@ int git_attr_get_many_with_session(
if (!num_attr) if (!num_attr)
return 0; return 0;
assert(values && repo && names); GIT_ASSERT_ARG(values);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(pathname);
GIT_ASSERT_ARG(names);
if (git_repository_is_bare(repo)) if (git_repository_is_bare(repo))
dir_flag = GIT_DIR_FLAG_FALSE; dir_flag = GIT_DIR_FLAG_FALSE;
...@@ -206,7 +211,8 @@ int git_attr_foreach( ...@@ -206,7 +211,8 @@ int git_attr_foreach(
git_strmap *seen = NULL; git_strmap *seen = NULL;
git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN; git_dir_flag dir_flag = GIT_DIR_FLAG_UNKNOWN;
assert(repo && callback); GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(callback);
if (git_repository_is_bare(repo)) if (git_repository_is_bare(repo))
dir_flag = GIT_DIR_FLAG_FALSE; dir_flag = GIT_DIR_FLAG_FALSE;
...@@ -378,6 +384,9 @@ int git_attr_add_macro( ...@@ -378,6 +384,9 @@ int git_attr_add_macro(
git_attr_rule *macro = NULL; git_attr_rule *macro = NULL;
git_pool *pool; git_pool *pool;
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(name);
if ((error = git_attr_cache__init(repo)) < 0) if ((error = git_attr_cache__init(repo)) < 0)
return error; return error;
......
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