summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/errors.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-11-27 13:12:59 +0000
committerEmil Velikov <emil.l.velikov@gmail.com>2015-11-29 14:41:40 +0000
commitd37ebed470c6c37abfc6fe42079bff027ff58e9d (patch)
tree5fe33072a86946b076a999821d7c9510adc3b6eb /src/mesa/main/errors.c
parente714c971aea25323579d34d953bb597a5981bafd (diff)
downloadexternal_mesa3d-d37ebed470c6c37abfc6fe42079bff027ff58e9d.zip
external_mesa3d-d37ebed470c6c37abfc6fe42079bff027ff58e9d.tar.gz
external_mesa3d-d37ebed470c6c37abfc6fe42079bff027ff58e9d.tar.bz2
mesa: remove len argument from _mesa_shader_debug()
There was only a single user which was using strlen(buf). As this function is not user facing (i.e. we don't need to feed back original length via a callback), we can simplify things. Suggested-by: Timothy Arceri <timothy.arceri@collabora.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Diffstat (limited to 'src/mesa/main/errors.c')
-rw-r--r--src/mesa/main/errors.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 366b119..85e5bbd 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -1599,20 +1599,19 @@ _mesa_log(const char *fmtString, ...)
* \param ctx GL context.
* \param type The namespace to which this message belongs.
* \param id The message ID within the given namespace.
- * \param msg The message to output. Need not be null-terminated.
- * \param len The length of 'msg'. If negative, 'msg' must be null-terminated.
+ * \param msg The message to output. Must be null-terminated.
*/
void
-_mesa_shader_debug( struct gl_context *ctx, GLenum type, GLuint *id,
- const char *msg, int len )
+_mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id,
+ const char *msg)
{
enum mesa_debug_source source = MESA_DEBUG_SOURCE_SHADER_COMPILER;
enum mesa_debug_severity severity = MESA_DEBUG_SEVERITY_HIGH;
+ int len;
debug_get_id(id);
- if (len < 0)
- len = strlen(msg);
+ len = strlen(msg);
/* Truncate the message if necessary. */
if (len >= MAX_DEBUG_MESSAGE_LENGTH)