diff options
author | Lukas Mai <l.mai@web.de> | 2014-11-29 12:37:50 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-11-29 06:05:16 -0800 |
commit | e59642234eb8b658c16fed728636bfbbc49c4514 (patch) | |
tree | 3387394bff0e7e2f7ac09564be7493e6a71619d2 /util.c | |
parent | b7bea5dafa8e0cb5ca70b7525fbd6b51eb723815 (diff) | |
download | perl-e59642234eb8b658c16fed728636bfbbc49c4514.tar.gz |
make more use of NOT_REACHED
In particular, remove all instances of 'assert(0);'.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -184,7 +184,7 @@ Perl_safesysmalloc(MEM_SIZE size) croak_no_mem(); } } - /*NOTREACHED*/ + NOT_REACHED; /*NOTREACHED*/ } /* paranoid version of system's realloc() */ @@ -305,7 +305,7 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size) croak_no_mem(); } } - /*NOTREACHED*/ + NOT_REACHED; /*NOTREACHED*/ } /* safe version of system's free() */ @@ -1560,7 +1560,7 @@ Perl_die_sv(pTHX_ SV *baseex) { PERL_ARGS_ASSERT_DIE_SV; croak_sv(baseex); - assert(0); /* NOTREACHED */ + /* NOTREACHED */ NORETURN_FUNCTION_END; } #ifdef _MSC_VER @@ -1592,7 +1592,7 @@ Perl_die_nocontext(const char* pat, ...) va_list args; va_start(args, pat); vcroak(pat, &args); - assert(0); /* NOTREACHED */ + NOT_REACHED; /* NOTREACHED */ va_end(args); NORETURN_FUNCTION_END; } @@ -1614,7 +1614,7 @@ Perl_die(pTHX_ const char* pat, ...) va_list args; va_start(args, pat); vcroak(pat, &args); - assert(0); /* NOTREACHED */ + NOT_REACHED; /* NOTREACHED */ va_end(args); NORETURN_FUNCTION_END; } @@ -1717,7 +1717,7 @@ Perl_croak_nocontext(const char *pat, ...) va_list args; va_start(args, pat); vcroak(pat, &args); - assert(0); /* NOTREACHED */ + NOT_REACHED; /* NOTREACHED */ va_end(args); } #endif /* PERL_IMPLICIT_CONTEXT */ @@ -1728,7 +1728,7 @@ Perl_croak(pTHX_ const char *pat, ...) va_list args; va_start(args, pat); vcroak(pat, &args); - assert(0); /* NOTREACHED */ + NOT_REACHED; /* NOTREACHED */ va_end(args); } @@ -5665,7 +5665,7 @@ Perl_my_dirfd(DIR * dir) { return dir->dd_fd; #else Perl_croak_nocontext(PL_no_func, "dirfd"); - assert(0); /* NOT REACHED */ + NOT_REACHED; /* NOT REACHED */ return 0; #endif } |