Sign in
llvm
/
clang
/
refs/heads/google/testing
/
.
/
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
;
}