Fixing 3rdparty master

code cleanup

@karlitschek @kabum @butonic @tanghus @georgehrke THX