diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-05-12 13:46:16 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-05-23 12:14:12 -0700 |
| commit | 7fae24e67c95b1dbe93497135ae533e39b61e110 (patch) | |
| tree | 8ff59d8cb99acb5cf4b8a3e3bf58c38208bf4233 /vswitchd/vswitch.pic | |
| parent | 7fb563b94c6b265f5dae9965fe33392716a7886e (diff) | |
| download | openvswitch-7fae24e67c95b1dbe93497135ae533e39b61e110.tar.gz | |
Avoid sparse error or warning for sizeof(_Bool).
The sparse checker does not like taking sizeof(_Bool). Older versions of
sparse output a hard error ("error: cannot size expression"). Newer
versions output a warning ("warning: expression using sizeof bool"). This
commit avoids the problem by not using sizeof(_Bool) anywhere.
The only place where OVS uses sizeof(_Bool) anyway is in code generated by
the OVSDB IDL. It generates it for populating "optional bool" columns in
the database, that is, columns that are allowed to contain 0 or 1 instances
of a bool. For these columns, it generates code that looks roughly like
this:
row->column = xmalloc(sizeof *row->column);
*row->column = value;
This commit changes these columns from type "bool *" to type "const bool *"
and changes the generated code to:
static const bool true_value = true;
static const bool false_value = false;
row->column = value ? &true_value : &false_value;
which avoids the problem and saves a malloc() call at the same time.
The idltest code had a column with a slightly different type ("0, 1, or
2 bools") that didn't fit the revised pattern and is a fairly stupid type
anyhow, so I just changed it to "0 or 1 bools".
Diffstat (limited to 'vswitchd/vswitch.pic')
| -rw-r--r-- | vswitchd/vswitch.pic | 104 |
1 files changed, 47 insertions, 57 deletions
diff --git a/vswitchd/vswitch.pic b/vswitchd/vswitch.pic index f7264df38..161a811bc 100644 --- a/vswitchd/vswitch.pic +++ b/vswitchd/vswitch.pic @@ -1,88 +1,78 @@ -.\" Generated from vswitch.gv with cksum "1443954516 1149" +.\" Generated from vswitch.gv with cksum "2042380787 1020" .PS linethick = 1; linethick = 1; -box at 2.320997253,3.1110975 wid 0.5020540998 height 0.296295 "Bridge" +box at 2.735854117,2.79404 wid 0.5917916422 height 0.349255 "Bridge" linethick = 1; -box at 0.2304523251,2.37036 wid 0.4609046502 height 0.296295 "sFlow" +box at 0.2716435539,1.9209025 wid 0.5432871078 height 0.349255 "sFlow" linethick = 1; -box at 0.847759254,2.37036 wid 0.4855919496 height 0.296295 "Mirror" +box at 0.999288406,1.9209025 wid 0.5723870344 height 0.349255 "Mirror" linethick = 1; -box at 2.320997253,2.37036 wid 0.4444425 height 0.296295 "Port" +box at 2.735854117,1.9209025 wid 0.5238825 height 0.349255 "Port" linethick = 1; -box at 3.045260751,2.37036 wid 0.707789496 height 0.296295 "Controller" +box at 3.589573039,1.9209025 wid 0.834300344 height 0.349255 "Controller" linethick = 1; -box at 3.851835,2.37036 wid 0.609064002 height 0.296295 "NetFlow" +box at 4.540315,1.9209025 wid 0.717928578 height 0.349255 "NetFlow" linethick = 0.5; -box at 2.057590998,1.6296225 wid 0.4444425 height 0.296295 "QoS" -box at 2.057590998,1.6296225 wid 0.388886944444444 height 0.240739444444444 +box at 2.153715883,1.047765 wid 0.5238825 height 0.349255 "QoS" +box at 2.153715883,1.047765 wid 0.468326944444444 height 0.293699444444444 linethick = 0.5; -box at 1.991754249,0.888885 wid 0.5102851749 height 0.296295 "Queue" -box at 1.991754249,0.888885 wid 0.454729619344444 height 0.240739444444444 -linethick = 1; -box at 2.938238997,0.888885 wid 0.5761278498 height 0.296295 "Monitor" -linethick = 1; -box at 2.938238997,0.1481475 wid 1.218128004 height 0.296295 "Maintenance_Point" +box at 2.153715883,0.1746275 wid 0.6014939461 height 0.349255 "Queue" +box at 2.153715883,0.1746275 wid 0.545938390544444 height 0.293699444444444 linethick = 0.5; -box at 3.637850751,3.851835 wid 0.954721749 height 0.296295 "Open_vSwitch" -box at 3.637850751,3.851835 wid 0.899166193444444 height 0.240739444444444 +box at 4.288083039,3.6671775 wid 1.125369461 height 0.349255 "Open_vSwitch" +box at 4.288083039,3.6671775 wid 1.06981390544444 height 0.293699444444444 linethick = 1; -box at 3.061734753,3.1110975 wid 0.699611754 height 0.296295 "Capability" +box at 3.608991617,2.79404 wid 0.824660906 height 0.349255 "Capability" linethick = 1; -box at 4.22220375,3.1110975 wid 0.4444425 height 0.296295 "SSL" +box at 4.97688375,2.79404 wid 0.5238825 height 0.349255 "SSL" linethick = 1; -box at 4.905341502,3.1110975 wid 0.633715746 height 0.296295 "Manager" +box at 5.782126078,2.79404 wid 0.746986594 height 0.349255 "Manager" linethick = 1; -box at 2.872402248,1.6296225 wid 0.641952747 height 0.296295 "Interface" +box at 2.9686675,1.047765 wid 0.756695883 height 0.349255 "Interface" linethick = 1; -spline -> from 2.072227971,3.066534732 to 2.072227971,3.066534732 to 1.825829049,3.018534942 to 1.439934441,2.932787169 to 1.119343251,2.8148025 to 0.887818338,2.729588058 to 0.637567581,2.60087751 to 0.4617876093,2.503870527 -"sflow" at 1.271579622,2.74072875 +spline -> from 2.442619619,2.741512048 to 2.442619619,2.741512048 to 2.152179161,2.684932738 to 1.697309449,2.583858341 to 1.319415539,2.444785 to 1.046507682,2.344339262 to 0.751526909,2.19262289 to 0.5443278877,2.078276803 +"sflow" at 1.498862758,2.35747125 linethick = 1; -spline -> from 2.071042791,2.98546842 to 2.071042791,2.98546842 to 1.796021772,2.847157914 to 1.357208877,2.626536657 to 1.086632283,2.490477993 -"mirrors" at 1.9259175,2.74072875 +spline -> from 2.441222599,2.64595588 to 2.441222599,2.64595588 to 2.117044108,2.482923646 to 1.599797453,2.222868373 to 1.280857787,2.062490477 +"mirrors" at 2.2701575,2.35747125 linethick = 1; -spline -> from 2.320997253,2.96117223 to 2.320997253,2.96117223 to 2.320997253,2.832698718 to 2.320997253,2.648462487 to 2.320997253,2.520048234 -"ports" at 2.469144753,2.74072875 +spline -> from 2.735854117,2.61731697 to 2.735854117,2.61731697 to 2.735854117,2.465880002 to 2.735854117,2.248713243 to 2.735854117,2.097346126 +"ports" at 2.910481617,2.35747125 linethick = 1; -spline -> from 2.495218713,2.960816676 to 2.495218713,2.960816676 to 2.546240712,2.915068728 to 2.601410841,2.863868952 to 2.650180998,2.8148025 to 2.743336146,2.721054762 to 2.842120899,2.609944137 to 2.917557606,2.522300076 -"controller" at 3.065823624,2.74072875 +spline -> from 2.941216057,2.616897864 to 2.941216057,2.616897864 to 3.001357768,2.562972892 to 3.066389049,2.502621628 to 3.123876422,2.444785 to 3.233682194,2.334280718 to 3.350123811,2.203310093 to 3.439044134,2.100000464 +"controller" at 3.613811336,2.35747125 linethick = 1; -spline -> from 2.571070233,2.988964701 to 2.571070233,2.988964701 to 2.594773833,2.979424002 to 2.61865521,2.970594411 to 2.641943997,2.96295 to 2.957675949,2.859720822 to 3.079038381,2.966624058 to 3.374444496,2.8148025 to 3.514473513,2.742862074 to 3.643184061,2.618003361 to 3.731598489,2.518922313 -"netflow" at 3.802472253,2.74072875 +spline -> from 3.030625337,2.650077089 to 3.030625337,2.650077089 to 3.058565737,2.638831078 to 3.08671569,2.628423279 to 3.114167133,2.6194125 to 3.486333261,2.497732058 to 3.629388109,2.623743262 to 3.977595344,2.444785 to 4.142653257,2.359985886 to 4.294369629,2.212809829 to 4.398587321,2.096018957 +"netflow" at 4.482129117,2.35747125 linethick = 0.5; -spline -> from 1.091017449,2.37036 to 1.091017449,2.37036 to 1.370542152,2.37036 to 1.825414236,2.37036 to 2.096701938,2.37036 -"select_src_port" at 1.588496754,2.44443375 +spline -> from 1.286026761,1.9209025 to 1.286026761,1.9209025 to 1.615513928,1.9209025 to 2.151690204,1.9209025 to 2.471468082,1.9209025 +"select_src_port" at 1.872425906,2.00821625 linethick = 0.5; -spline -> from 1.067787921,2.221501392 to 1.067787921,2.221501392 to 1.095284097,2.208345894 to 1.123787676,2.197086684 to 1.152231996,2.189264496 to 1.526156286,2.08650939 to 1.651429812,2.084257548 to 2.024702253,2.189264496 to 2.052553983,2.197145943 to 2.080346454,2.208405153 to 2.107190781,2.221501392 -"output_port" at 1.588496754,2.263338246 +spline -> from 1.258645169,1.745436788 to 1.258645169,1.745436788 to 1.291056033,1.729929866 to 1.324654364,1.716658176 to 1.358182844,1.707437844 to 1.798942654,1.58631621 to 1.946607668,1.583661872 to 2.386599117,1.707437844 to 2.419429087,1.716728027 to 2.452189206,1.729999717 to 2.483831709,1.745436788 +"output_port" at 1.872425906,1.794751594 linethick = 0.5; -spline -> from 0.905240484,2.221264356 to 0.905240484,2.221264356 to 0.953892123,2.117798142 to 1.034780658,1.987843155 to 1.152231996,1.9259175 to 1.495282347,1.745118291 to 1.682837082,1.742984967 to 2.024702253,1.9259175 to 2.140790634,1.988080191 to 2.21924955,2.117975919 to 2.266123419,2.221442133 -"select_dst_port" at 1.588496754,1.99999125 -linethick = 1; -spline -> from 2.267664153,2.22043473 to 2.267664153,2.22043473 to 2.221975464,2.091961218 to 2.156494269,1.907724987 to 2.11080558,1.779310734 -"qos" at 2.312760252,1.99999125 -linethick = 1; -spline -> from 2.43258195,2.22043473 to 2.43258195,2.22043473 to 2.528225976,2.091961218 to 2.665351302,1.907724987 to 2.760995328,1.779310734 -"interfaces" at 2.930001996,1.99999125 +spline -> from 1.067043876,1.745157384 to 1.067043876,1.745157384 to 1.124391547,1.623197538 to 1.219738162,1.470014295 to 1.358182844,1.39702 to 1.762550283,1.183904599 to 1.983628698,1.181389963 to 2.386599117,1.39702 to 2.523437226,1.470293699 to 2.61591995,1.623407091 to 2.671172091,1.745366937 +"select_dst_port" at 1.872425906,1.48433375 linethick = 1; -spline -> from 2.023220778,1.479637971 to 2.023220778,1.479637971 to 2.013917115,1.433001138 to 2.005028265,1.381268031 to 1.99999125,1.3333275 to 1.989620925,1.235076078 to 1.98754686,1.123965453 to 1.988080191,1.037447313 -"queues value" at 2.378597001,1.25925375 +spline -> from 2.61801548,1.74417947 to 2.61801548,1.74417947 to 2.517010934,1.592742502 to 2.372279662,1.375575743 to 2.271344967,1.224208626 +"qos" at 2.6194125,1.48433375 linethick = 1; -spline -> from 2.938238997,0.73895973 to 2.938238997,0.73895973 to 2.938238997,0.610486218 to 2.938238997,0.4262736906 to 2.938238997,0.2978238822 -"remote_mps" at 3.288044874,0.51851625 +spline -> from 2.782933691,1.74417947 to 2.782933691,1.74417947 to 2.82337742,1.592742502 to 2.881214048,1.375575743 to 2.921587926,1.224208626 +"interfaces" at 3.211190172,1.48433375 linethick = 1; -spline -> from 3.159808398,3.796309317 to 3.159808398,3.796309317 to 2.96591295,3.754828017 to 2.749321305,3.682295001 to 2.584344249,3.55554 to 2.486211345,3.480162552 to 2.417352387,3.356903832 to 2.374685907,3.259245 -"bridges" at 2.790091497,3.48146625 +spline -> from 2.153715883,0.87104197 to 2.153715883,0.87104197 to 2.153715883,0.719605002 to 2.153715883,0.5024661834 to 2.153715883,0.3510571558 +"queues value" at 2.599993922,0.61119625 linethick = 1; -spline -> from 3.219067398,3.702146766 to 3.219067398,3.702146766 to 3.159926916,3.663332121 to 3.106830852,3.615095295 to 3.069971754,3.55554 to 3.015927546,3.468251493 to 3.015809028,3.35168904 to 3.028194159,3.25983759 -"capabilities value" at 3.55554,3.48146625 +spline -> from 3.724595022,3.601727113 to 3.724595022,3.601727113 to 3.49604255,3.552831413 to 3.240737145,3.467333789 to 3.046271961,3.3179225 to 2.930598705,3.229072028 to 2.849431843,3.083781948 to 2.799139123,2.9686675 +"bridges" at 3.288794633,3.23060875 linethick = 1; -spline -> from 3.884901522,3.703568982 to 3.884901522,3.703568982 to 3.941612385,3.661080279 to 3.997849176,3.611065683 to 4.041108246,3.55554 to 4.109256096,3.468132975 to 4.155478116,3.351570522 to 4.184159472,3.259778331 -"ssl" at 4.205729748,3.48146625 +spline -> from 3.794446022,3.490733874 to 3.794446022,3.490733874 to 3.724734724,3.444981469 to 3.662148228,3.388122755 to 3.618700906,3.3179225 to 3.554996794,3.215031977 to 3.554857092,3.07763506 to 3.569455951,2.96936601 +"capabilities value" at 4.19106,3.23060875 linethick = 1; -spline -> from 4.020249078,3.702146766 to 4.020249078,3.702146766 to 4.117848651,3.659065473 to 4.22101857,3.609110136 to 4.312751502,3.55554 to 4.46042493,3.469258896 to 4.614616848,3.352696443 to 4.728690423,3.260548698 -"manager_options" at 5.024689128,3.48146625 +spline -> from 4.579291858,3.492410298 to 4.579291858,3.492410298 to 4.646139265,3.442327131 to 4.712427864,3.383372887 to 4.763419094,3.3179225 to 4.843747744,3.214892275 to 4.898231524,3.077495358 to 4.932039408,2.969296159 +"ssl" at 4.957465172,3.23060875 linethick = 1; -spline -> from 2.885735523,1.47969723 to 2.885735523,1.47969723 to 2.89717251,1.351223718 to 2.913527994,1.166987487 to 2.924964981,1.038573234 -"monitor" at 3.139897374,1.25925375 +spline -> from 4.738831542,3.490733874 to 4.738831542,3.490733874 to 4.853876139,3.439952197 to 4.97548673,3.381067804 to 5.083616078,3.3179225 to 5.25768477,3.216219444 to 5.439437072,3.078822527 to 5.573900247,2.970204222 +"manager_options" at 5.922805992,3.23060875 .PE |
