Skip to content

Commit e47e4ad

Browse files
committed
Simplify Cabs2cil.stripConstLocalType
1 parent 7606d26 commit e47e4ad

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/frontc/cabs2cil.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,7 @@ let alphaConvertVarAndAddToEnv (addtoenv: bool) (vi: varinfo) : varinfo =
615615
* a struct we must recursively strip the "const" from fields and array
616616
* elements. *)
617617
let rec stripConstLocalType (t: typ) : typ =
618-
let dc a =
619-
if hasAttribute "pconst" a then
620-
dropAttribute "pconst" a
621-
else a
622-
in
618+
let dc = dropAttribute "pconst" in
623619
match t with
624620
| TPtr (bt, a) ->
625621
(* We want to be able to detect by pointer equality if the type has

0 commit comments

Comments
 (0)