Sign in
llvm
/
clang
/
e8264bb9815647b4c6558aeb045c65965cdb26d3
/
.
/
test
/
Analysis
/
division-by-zero.c
blob: 33bb6fa3a6f5df89b6e262a83a71142537c5b9e4 [
file
] [
log
] [
blame
]
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.Malloc %s
// Do not crash due to division by zero
int
f
(
unsigned
int
a
)
{
if
(
a
<=
0
)
return
1
/
a
;
return
a
;
}