Skip to content

Commit 3cd7e75

Browse files
committed
Remove trailing whitespace, break long lines, remove other spurious whitespace
1 parent 536b1df commit 3cd7e75

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

lib/SDN_OpenFlow0x01.ml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@ let from_pattern (pat : AL.Pattern.t) : Core.pattern =
4848
| None -> None)
4949
; Core.dlVlanPcp = pat.AL.Pattern.dlVlanPcp
5050
; Core.nwSrc = (match pat.AL.Pattern.nwSrc with
51-
| None -> None
51+
| None -> None
5252
| Some (p,m) ->
53-
let mo =
54-
if m = 32l then
55-
None
56-
else
53+
let mo =
54+
if m = 32l then
55+
None
56+
else
5757
Some (Int32.sub 32l m) in
5858
Some { Core.m_value = p; Core.m_mask = mo })
5959
; Core.nwDst = (match pat.AL.Pattern.nwDst with
60-
| None -> None
60+
| None -> None
6161
| Some (p,m) ->
62-
let mo =
63-
if m = 32l then
64-
None
65-
else
62+
let mo =
63+
if m = 32l then
64+
None
65+
else
6666
Some (Int32.sub 32l m) in
6767
Some { Core.m_value = p; Core.m_mask = mo })
6868
; Core.nwProto = pat.AL.Pattern.nwProto
@@ -129,8 +129,10 @@ module Common = HighLevelSwitch_common.Make (struct
129129
end
130130
| AL.Modify (AL.SetVlanPcp pcp) ->
131131
(Mod.dlVlanPcp, SetDlVlanPcp(VInt.(get_int4 (Int4 pcp))))
132-
| AL.Modify (AL.SetEthTyp _) -> raise (Invalid_argument "cannot set Ethernet type")
133-
| AL.Modify (AL.SetIPProto _) -> raise (Invalid_argument "cannot set IP protocol")
132+
| AL.Modify (AL.SetEthTyp _) ->
133+
raise (Invalid_argument "cannot set Ethernet type")
134+
| AL.Modify (AL.SetIPProto _) ->
135+
raise (Invalid_argument "cannot set IP protocol")
134136
| AL.Modify (AL.SetIP4Src nwAddr) ->
135137
(Mod.nwSrc, SetNwSrc nwAddr)
136138
| AL.Modify (AL.SetIP4Dst nwAddr) ->
@@ -141,11 +143,13 @@ module Common = HighLevelSwitch_common.Make (struct
141143
(Mod.tpDst, SetTpDst VInt.(get_int16 (Int16 tp)))
142144
end)
143145

144-
let from_group (inPort : Core.portId option) (group : AL.group) : Core.action list =
146+
let from_group (inPort : Core.portId option) (group : AL.group)
147+
: Core.action list =
145148
match group with
146149
| [] -> []
147150
| [par] -> Common.flatten_par inPort par
148-
| _ -> raise (SDN_Types.Unsupported "OpenFlow 1.0 does not support fast-failover")
151+
| _ ->
152+
raise (SDN_Types.Unsupported "OpenFlow 1.0 does not support fast-failover")
149153

150154
let from_timeout (timeout : AL.timeout) : Core.timeout =
151155
match timeout with

0 commit comments

Comments
 (0)