Linux C Factory Method Design Pattern