X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/03944e7734220bf7e7aa7b7113bcbdf9c22808a5..a4ec38a4c7ef61b04b92d34637c846a8e2e95f7f:/lunaix-os/includes/lunaix/common.h diff --git a/lunaix-os/includes/lunaix/common.h b/lunaix-os/includes/lunaix/common.h index 7fdf0b3..4c8c794 100644 --- a/lunaix-os/includes/lunaix/common.h +++ b/lunaix-os/includes/lunaix/common.h @@ -32,8 +32,6 @@ #define USTACK_END (0x9fffffff - USTACK_SIZE + 1) #define UMMAP_AREA 0x4D000000 -#define SYS_TIMER_FREQUENCY_HZ 2048 - #ifndef __ASM__ #include // From Linux kernel v2.6.0 @@ -48,7 +46,7 @@ #define container_of(ptr, type, member) \ ({ \ const typeof(((type*)0)->member)* __mptr = (ptr); \ - (type*)((char*)__mptr - offsetof(type, member)); \ + (ptr) ? (type*)((char*)__mptr - offsetof(type, member)) : 0; \ }) #endif