Research
.
Skip Search Box

SELinux Mailing List

RE: [PATCH] clean up datum cast to uint32

From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Thu, 27 Jul 2006 11:13:21 -0400


On Thu, 2006-07-27 at 10:38 -0400, Joshua Brindle wrote:
> This has the same fragility that the uint32_t cast had since this struct
> has to be first, also the way I did it is pretty standard in the
> library, for example destroy_f[SYM_NUM]. And is intuitive, a simple
> function call returns the value.

Embedding the struct makes the common header explicit, which reduces the likelihood of accidental divergence. The method invocation makes sense when the implementations of those methods are divergent for the different objects, but in this case, we already have a common header and don't intend to change that - we just want to make it explicit, and the implementation is always the same. And it is heavyweight to require indirect function call overhead just to access the common header.

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Thu 27 Jul 2006 - 11:11:09 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service