]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_utilities/lib/endian.h
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_utilities / lib / endian.h
index 5f96a103821d65fb692c01ad511428f2ab043b05..b5707cf5e8f250aefcab7cc30ec540ddc90146cb 100644 (file)
@@ -123,16 +123,16 @@ class Endian {
 public:
     typedef Type Value;
     Endian() : mValue(Type(0)) { }
 public:
     typedef Type Value;
     Endian() : mValue(Type(0)) { }
-    Endian(Value v) : mValue(h2n(v)) { }
+    Endian(Value v) : mValue((Type) h2n(v)) { }
     
     
-    Type get ()        const                   { return n2h(mValue); }
+    Type get ()        const                   { return (Type) n2h(mValue); }
     operator Value () const            { return this->get(); }
     Endian &operator = (Value v)       { mValue = h2n(v); return *this; }
 
     
 private:
     Value mValue;
     operator Value () const            { return this->get(); }
     Endian &operator = (Value v)       { mValue = h2n(v); return *this; }
 
     
 private:
     Value mValue;
-};
+} __attribute__((packed));
 
 
 }      // end namespace Security
 
 
 }      // end namespace Security