Name every local error context errctx
Closes internal-consistency item 18. The convention was settled -- AGENTS.md records errctx winning 92 sites to 45 -- but the other 45 were still there, and four files favoured `e` throughout while six favoured errctx, sometimes within one file. Its own commit because it is a rename and nothing else. All 333 changed lines are a single identifier substitution: applying \be\b -> errctx to each removed line reproduces the added line exactly, and the counts match at 333 either way. `e` keeps its meaning where the convention actually wants it -- an incoming error context being inspected, as in akgl_get_json_with_default(e, ...) -- which is why that function was left alone. 25/25 pass, reindent --check clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,14 +22,14 @@ akerr_ErrorContext *akgl_string_initialize(akgl_String *obj, char *init)
|
||||
|
||||
akerr_ErrorContext *akgl_string_copy(akgl_String *src, akgl_String *dst, int count)
|
||||
{
|
||||
PREPARE_ERROR(e);
|
||||
FAIL_ZERO_RETURN(e, src, AKERR_NULLPOINTER, "NULL argument");
|
||||
FAIL_ZERO_RETURN(e, dst, AKERR_NULLPOINTER, "NULL argument");
|
||||
PREPARE_ERROR(errctx);
|
||||
FAIL_ZERO_RETURN(errctx, src, AKERR_NULLPOINTER, "NULL argument");
|
||||
FAIL_ZERO_RETURN(errctx, dst, AKERR_NULLPOINTER, "NULL argument");
|
||||
if ( count == 0 ) {
|
||||
count = AKGL_MAX_STRING_LENGTH;
|
||||
}
|
||||
if ( (char *)dst->data != strncpy((char *)&dst->data, (char *)&src->data, count) ) {
|
||||
FAIL_RETURN(e, errno, "strncpy");
|
||||
FAIL_RETURN(errctx, errno, "strncpy");
|
||||
}
|
||||
SUCCEED_RETURN(e);
|
||||
SUCCEED_RETURN(errctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user