Clean up some of the formatting in the rendered version.

This commit is contained in:
Brad Davis 2015-04-13 13:57:34 +00:00
parent 03725d1e2b
commit 0dda9d7b0e
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46528

View file

@ -649,11 +649,9 @@ struct in_addr {
<para>Suppose we coded something like this:</para>
<programlisting>
sa.sin_family = AF_INET;
sa.sin_port = 13;
sa.sin_addr.s_addr = (((((192 &lt;&lt; 8) | 43) &lt;&lt; 8) | 244) &lt;&lt; 8) | 18;
</programlisting>
<programlisting>sa.sin_family = AF_INET;
sa.sin_port = 13;
sa.sin_addr.s_addr = (((((192 &lt;&lt; 8) | 43) &lt;&lt; 8) | 244) &lt;&lt; 8) | 18;</programlisting>
<para>What would the result look like?</para>
@ -838,11 +836,9 @@ struct in_addr {
to <emphasis>reverse</emphasis> the values in our code:
</para>
<programlisting>
sa.sin_family = AF_INET;
sa.sin_port = 13 &lt;&lt; 8;
sa.sin_addr.s_addr = (((((18 &lt;&lt; 8) | 244) &lt;&lt; 8) | 43) &lt;&lt; 8) | 192;
</programlisting>
<programlisting>sa.sin_family = AF_INET;
sa.sin_port = 13 &lt;&lt; 8;
sa.sin_addr.s_addr = (((((18 &lt;&lt; 8) | 244) &lt;&lt; 8) | 43) &lt;&lt; 8) | 192;</programlisting>
<para>This will <emphasis>trick</emphasis> our compiler
into storing the data in the <emphasis>network byte