buf[0] = ( entry->subjectName.len >> 8 ) & 0xff; buf[1] = entry->subjectName.len & 0xff;
buf[0] = (unsigned char)( entry->subjectName.len >> 8 ); buf[1] = (unsigned char)entry->subjectName.len;
EncodeDBNicknameEntry(certDBEntryNickname *entry, PRArenaPool *arena,		      SECItem *dbitem){    unsigned char *buf;        /* allocate space for encoded database record, including space     * for low level header     */    dbitem->len = entry->subjectName.len + DB_NICKNAME_ENTRY_HEADER_LEN +	SEC_DB_ENTRY_HEADER_LEN;        dbitem->data = (unsigned char *)PORT_ArenaAlloc(arena, dbitem->len);    if ( dbitem->data == NULL) {	PORT_SetError(SEC_ERROR_NO_MEMORY);	goto loser;    }        /* fill in database record */    buf = &dbitem->data[SEC_DB_ENTRY_HEADER_LEN];        buf[0] = ( entry->subjectName.len >> 8 ) & 0xff;    buf[1] = entry->subjectName.len & 0xff;        PORT_Memcpy(&buf[DB_NICKNAME_ENTRY_HEADER_LEN], entry->subjectName.data,	      entry->subjectName.len);    return(SECSuccess);loser:    return(SECFailure);}