memset(hdrBuf, NULL, HDRRESERVE);
XP_MEMSET(hdrBuf, NULL, HDRRESERVE);
static REGERR nr_WriteHdr(REGFILE *reg){#ifdef XP_MAC  #define HACK_WRITE_ENTIRE_RESERVE 1#endif	REGERR err;#if HACK_WRITE_ENTIRE_RESERVE    /*      * pinkerton     * Until NSPR can be fixed to seek out past the EOF on MacOS, we need to make     * sure that we write all 128 bytes to push out the EOF to the right location     */    char hdrBuf[HDRRESERVE];    memset(hdrBuf, NULL, HDRRESERVE);#else    char hdrBuf[sizeof(REGHDR)];#endif	XP_ASSERT(reg);    if (reg->readOnly)        return REGERR_READONLY;    /* convert to XP int format */    nr_WriteLong ( reg->hdr.magic,    hdrBuf + HDR_MAGIC );    nr_WriteShort( reg->hdr.verMajor, hdrBuf + HDR_VERMAJOR );    nr_WriteShort( reg->hdr.verMinor, hdrBuf + HDR_VERMINOR );    nr_WriteLong ( reg->hdr.avail,    hdrBuf + HDR_AVAIL );    nr_WriteLong ( reg->hdr.root,     hdrBuf + HDR_ROOT );	/* err = nr_WriteFile(reg->fh, 0, sizeof(REGHDR), &reg->hdr); */	err = nr_WriteFile(reg->fh, 0, sizeof(hdrBuf), &hdrBuf);	if (err == REGERR_OK)		reg->hdrDirty = 0;	return err;}	/* WriteHdr */