diff options
author | Karl Williamson <khw@cpan.org> | 2017-03-25 11:35:11 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-10-24 10:15:33 -0600 |
commit | 7f4ec488653048a5623702c419020a9402453c6a (patch) | |
tree | 8e2a7581c587562361cd541b6c08cd24e6de76f8 /dquote.c | |
parent | 5f50c6c9d82978f1ddf6d78eea0235b7b3d1836b (diff) | |
download | perl-7f4ec488653048a5623702c419020a9402453c6a.tar.gz |
dquote.c: Rmv extraneous #ifdef; add assertions
assert() already does nothing unless -DDEBUGGING; no need to enclose
them in #ifdef DEBUGGING. And this adds another assertion that is
required to be true on entry to the function.
Diffstat (limited to 'dquote.c')
-rw-r--r-- | dquote.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -96,15 +96,10 @@ Perl_grok_bslash_o(pTHX_ char **s, UV *uv, const char** error_msg, * ourselves */ | PERL_SCAN_SILENT_ILLDIGIT; -#ifdef DEBUGGING - char *start = *s - 1; - assert(*start == '\\'); -#endif - PERL_ARGS_ASSERT_GROK_BSLASH_O; - - assert(**s == 'o'); + assert(*(*s - 1) == '\\'); + assert(* *s == 'o'); (*s)++; if (**s != '{') { @@ -201,14 +196,12 @@ Perl_grok_bslash_x(pTHX_ char **s, UV *uv, const char** error_msg, char* e; STRLEN numbers_len; I32 flags = PERL_SCAN_DISALLOW_PREFIX; -#ifdef DEBUGGING - char *start = *s - 1; - assert(*start == '\\'); -#endif + PERL_ARGS_ASSERT_GROK_BSLASH_X; - assert(**s == 'x'); + assert(*(*s - 1) == '\\'); + assert(* *s == 'x'); (*s)++; if (strict || ! output_warning) { |