sigmasternchen / Serwer

Standalone Webserver
MIT License
0 stars 0 forks source link

casting the result of malloc #2

Closed BloodyWulf closed 7 years ago

BloodyWulf commented 7 years ago

Hey there.

You shouldn't cast the result of malloc in C (in C++ you have to cast!). If you forget to include the cast can obfuscate warnings. If you forget to include the build-in malloc from the compiler will be used.

Do I cast the result of malloc?

Regards

sigmasternchen commented 7 years ago

Apparently there is more than one opinion on this. Nevertheless I understand the reason why one should not cast.