Avoid using NULL in pointer arithmetic (-Wpointer-arith)

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364934%28v=vs.85%29.aspx says that the return value is zero anyway if the function fails.