Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...
|
Re: Cleaned up udev-selinux patch: msg#00187
|
Subject: |
Re: Cleaned up udev-selinux patch |
On Thu, Aug 26, 2004 at 11:59:28PM +0100, Luke Kenneth Casson Leighton wrote:
> perhaps the style should be that the Makefile adds some code
> add_selinux.c based on a configure-time option,
>
> and that some #ifdefs in a header file call a function which
> is a stub in the header if WITH_SELINUX is not defined.
>
> bizarre_but_likely_quite_good_coding_style_never_encountered_before.h:
You've never read Linux kernel code, have you :)
> #ifdef WITH_SELINUX
> int do_add_selinux_stuff(args) { return 0; }
Logic is backwards here.
> #else
> #define do_add_selinux_stuff the_real_add_selinux_stuff
This define is unncessary. Just call the function
do_add_selinux_stuff(), and protype it.
Actually, inline functions that do nothing if selinux is disabled is
better to catch compiler errors with types if things change in the
future.
thanks,
greg k-h
|
| |