Revision: 48413
http://brlcad.svn.sourceforge.net/brlcad/?rev=48413&view=rev
Author: brlcad
Date: 2012-01-11 17:48:13 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
eh, reduce. Endian isn't used other than to check if we're big endian so just
eliminate the static altogether (which was a multithreading issue anyways).
(cov cid 161)
Modified Paths:
--------------
brlcad/trunk/src/libbu/convert.c
Modified: brlcad/trunk/src/libbu/convert.c
===================================================================
--- brlcad/trunk/src/libbu/convert.c 2012-01-11 17:47:03 UTC (rev 48412)
+++ brlcad/trunk/src/libbu/convert.c 2012-01-11 17:48:13 UTC (rev 48413)
@@ -251,7 +251,6 @@
int
bu_cv_optimize(register int cookie)
{
- static int Endian = END_NOTSET;
int fmt;
if (cookie & CV_HOST_MASK)
@@ -260,26 +259,6 @@
/* This is a network format request */
fmt = cookie & CV_TYPE_MASK;
- /* Run time check: which kind of integers does this machine have? */
- if (Endian == END_NOTSET) {
- bu_endian_t end = bu_byteorder();
-
- switch(end) {
- case BU_PDP_ENDIAN:
- Endian = END_CRAY;
- break;
- case BU_BIG_ENDIAN:
- Endian = END_BIG;
- break;
- case BU_LITTLE_ENDIAN:
- Endian = END_LITTLE;
- break;
- default:
- Endian = END_ILL;
- break;
- }
- }
-
switch (fmt) {
case CV_D:
cookie |= CV_HOST_MASK; /* host uses network fmt */
@@ -290,7 +269,7 @@
case CV_32:
case CV_64:
/* host is big-endian, so is network */
- if (Endian == END_BIG)
+ if (bu_byteorder() == BU_BIG_ENDIAN)
cookie |= CV_HOST_MASK;
return cookie;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits