Skip to content

glsl: Use nullptr instead of NULL in builtin_functions.cpp.

Rémi Bernon requested to merge rbernon/mesa:glsl-null into main
glsl: Use nullptr instead of NULL in builtin_functions.cpp.

In C++, NULL might be defined to 0, and using it in a vararg function
might end up with a 32bit 0 value pushed on the stack. Depending on the
stack layout and previous contents, it's then possible that the value
that is read from va_arg as a 64bit pointer isn't 0.

Using nullptr instead makes sure that the compiler knows it's a pointer
value and writes it fully to the stack.

Merge request reports

Loading