err = nr_FindAtLevel(reg, desc.down, path, &desc, 0);
if ( err == REGERR_OK) {  err = nr_FindAtLevel(reg, desc.down, path, &desc, 0);
static REGERR nr_RegAddKey( REGFILE *reg, RKEY key, char *path, RKEY *newKey, Bool raw ){    REGERR      err;    REGDESC     desc;    REGOFF      start;    char        namebuf[MAXREGNAMELEN];    char        *p;    XP_ASSERT( regStartCount > 0 );    XP_ASSERT( reg != NULL );    XP_ASSERT( path != NULL );    XP_ASSERT( *path != '\0' );    XP_ASSERT( VALID_FILEHANDLE( reg->fh ) );    /* have to translate again in case this is an internal call */    start = nr_TranslateKey( reg, key );    /* Get starting desc */    err = nr_ReadDesc( reg, start, &desc );    if (raw == TRUE) {        /* look for name at next level down */        err = nr_FindAtLevel(reg, desc.down, path, &desc, 0);        /* if key is not found */        if ( err == REGERR_NOFIND ) {            /* add it as a sub-key to the last found key */            err = nr_CreateSubKey(reg, &desc, path);        }    }    else {        /* Walk 'path', reading keys into 'desc' */        p = path;        while ( err == REGERR_OK ) {            /* get next name on the path */            err = nr_NextName(p, namebuf, sizeof(namebuf), &p);            if ( err == REGERR_OK ) {                /* look for name at next level down */                err = nr_FindAtLevel(reg, desc.down, namebuf, &desc, 0);                /* if key is not found */                if ( err == REGERR_NOFIND ) {                    /* add it as a sub-key to the last found key */                    err = nr_CreateSubKey(reg, &desc, namebuf);                }            }        }    }    /* it's good to have processed the whole path */    if ( (raw == FALSE && err == REGERR_NOMORE) ||         (raw == TRUE && err == REGERR_OK) )     {        err = REGERR_OK;        /* return new key if the caller wants it */        if ( newKey != NULL ) {            *newKey = desc.location;        }    }    return err;}   /* nr_RegAddKey */