* Find the existing script slot for a named script, if any. */
| 127 | * Find the existing script slot for a named script, if any. |
| 128 | */ |
| 129 | static struct ddb_script * |
| 130 | db_script_lookup(const char *scriptname) |
| 131 | { |
| 132 | int i; |
| 133 | |
| 134 | for (i = 0; i < DB_MAXSCRIPTS; i++) { |
| 135 | if (strcmp(db_script_table[i].ds_scriptname, scriptname) == |
| 136 | 0) |
| 137 | return (&db_script_table[i]); |
| 138 | } |
| 139 | return (NULL); |
| 140 | } |
| 141 | |
| 142 | /* |
| 143 | * Find a new slot for a script, if available. Does not mark as allocated in |
no test coverage detected