MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_script_new

Function db_script_new

freebsd/ddb/db_script.c:146–156  ·  view source on GitHub ↗

* Find a new slot for a script, if available. Does not mark as allocated in * any way--this must be done by the caller. */

Source from the content-addressed store, hash-verified

144 * any way--this must be done by the caller.
145 */
146static struct ddb_script *
147db_script_new(void)
148{
149 int i;
150
151 for (i = 0; i < DB_MAXSCRIPTS; i++) {
152 if (strlen(db_script_table[i].ds_scriptname) == 0)
153 return (&db_script_table[i]);
154 }
155 return (NULL);
156}
157
158/*
159 * Perform very rudimentary validation of a proposed script. It would be

Callers 1

db_script_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected