Changeset: e084ed07447b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e084ed07447b
Modified Files:
monetdb5/mal/mal_session.c
Branch: Mar2025
Log Message:
Use string length function instead of hard coded values.
diffs (14 lines):
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -321,8 +321,8 @@ MSscheduleClient(str command, str peer,
cleanUpScheduleClient(c, &command, &msg);
return;
}
- if (strncasecmp("sql", lang, 3) != 0
- && strncasecmp("msql", lang, 3) != 0
+ if (strncasecmp("sql", lang, strlen(lang)) != 0
+ && strncasecmp("msql", lang, strlen(lang)) != 0
&& strcmp(user, "monetdb") != 0) {
mnstr_printf(fout,
"!only the 'monetdb' user can
use non-sql languages. "
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]