minor refactoring
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-08-03 00:59:12 +09:00
parent 6c13a3e44b
commit 8b3b560aad
2 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ static global_t gtab[] =
#define MATCH_TERMINATOR(hawk) \
(MATCH_TERMINATOR_NORMAL(hawk) || MATCH_TERMINATOR_RBRACE(hawk))
#define ADJERR_LOC(hawk,l) do { (hawk)->_gem.errloc = *(l); } while (0)
#define ADJERR_LOC(hawk,l) do { if (l) (hawk)->_gem.errloc = *(l); } while (0)
#if defined(HAWK_OOCH_IS_BCH)
static HAWK_INLINE hawk_oow_t uc_to_utf8 (hawk_uch_t uc, hawk_bch_t* buf, hawk_oow_t bsz)

View File

@ -236,7 +236,7 @@ int hawk_sed_getopt (hawk_sed_t* sed, hawk_sed_opt_t id, void* value)
case HAWK_SED_DEPTH_REX_MATCH:
*(hawk_oow_t*)value = sed->opt.depth.rex.match;
return 0;
};
}
hawk_sed_seterrnum(sed, HAWK_NULL, HAWK_EINVAL);
return -1;