Add Strlen(), a strlen(3) that panics if string is stupid long and returns unsigned.

First batch of changes to use it to suppress warnings.
This commit is contained in:
nhkeni
2022-03-06 20:23:04 -05:00
parent 1e31fee0df
commit ff1289e828
16 changed files with 45 additions and 32 deletions

View File

@@ -383,7 +383,7 @@ savenames(NHFILE* nhfp)
for (i = 0; i < NUM_OBJECTS; i++)
if (objects[i].oc_uname) {
if (perform_bwrite(nhfp)) {
len = strlen(objects[i].oc_uname) + 1;
len = Strlen(objects[i].oc_uname) + 1;
if (nhfp->structlevel) {
bwrite(nhfp->fd, (genericptr_t)&len, sizeof len);
bwrite(nhfp->fd, (genericptr_t)objects[i].oc_uname, len);