From: windclarion Date: Wed, 2 Sep 2020 17:19:57 +0000 (+0800) Subject: [RUNTIME][CRT] use macro to replace hardcode number (#6365) X-Git-Tag: upstream/0.7.0~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd9282f1cdc17033cd05eaaa420c1db43773d59e;p=platform%2Fupstream%2Ftvm.git [RUNTIME][CRT] use macro to replace hardcode number (#6365) Signed-off-by: windclarion --- diff --git a/src/runtime/crt/graph_runtime/graph_runtime.c b/src/runtime/crt/graph_runtime/graph_runtime.c index d93e909..01b07dc 100644 --- a/src/runtime/crt/graph_runtime/graph_runtime.c +++ b/src/runtime/crt/graph_runtime/graph_runtime.c @@ -606,7 +606,7 @@ int TVMGraphRuntime_LoadParams(TVMGraphRuntime* runtime, const char* param_blob, uint64_t name_length; name_length = ((uint64_t*)bptr)[0]; // NOLINT(*) bptr += sizeof(name_length); - if (name_length >= 80) { + if (name_length >= TVM_CRT_STRLEN_NAME) { fprintf(stderr, "Error: function name longer than expected.\n"); status = -1; }