rem: readEl->size) != readEl->size) {
add: (size_t)readEl->size) != readEl->size) {
context: DbProxyCopyFromRemoteFile(Ns_DbHandle *dbhandle, char *destFile,			  char *remoteFileName, char *errbuf){    int                  status = NS_ERROR;    char                 remoteFdStr[4];    char                 readRequest[128];    char                 respbuf[RSP_BUFSIZE];    char                 remoteOpenParams[512];    int                  localDestFd = -1;    int                  fileLoc;    int                  done = 0;    Ns_List             *readInfo;    DbProxyInputElement *readEl;    remoteFdStr[0] = '\0';    sprintf(remoteOpenParams, "%d%c%s", O_RDONLY, ARG_TOKEN_DELIMITER,	    remoteFileName);    if ((localDestFd = open(destFile, O_CREAT | O_TRUNC | O_WRONLY,			    0644)) < 0) {	        sprintf(errbuf, "open/create on %s failed: %s", destFile,		strerror(errno));    } else if (DbProxySend(dbhandle, OpenF, remoteOpenParams,			   strlen(remoteOpenParams)) != NS_OK) {        sprintf(errbuf, "Can't send OpenF command to Proxy Daemon");    } else if (DbProxyGetString(dbhandle, respbuf, RSP_BUFSIZE) != NS_OK) {        sprintf(errbuf, "Can't get OpenF status response from Proxy Daemon");    } else if (strcasecmp(respbuf, OK_STATUS) != 0) {        strcpy(errbuf, respbuf);    } else if (DbProxyGetString(dbhandle, respbuf, RSP_BUFSIZE) != NS_OK) {        sprintf(errbuf, "Can't get OpenF fd response from Proxy Daemon");    } else {        strcpy(remoteFdStr, respbuf);        /*         * we now have a local (destination) and remote (source) file         * descriptor         */	        fileLoc = 0;        status = NS_OK;        while (!done && status == NS_OK) {            status = NS_ERROR;            sprintf(readRequest, "%s%c%d%c%d", remoteFdStr,		    ARG_TOKEN_DELIMITER,		    fileLoc, ARG_TOKEN_DELIMITER, FILE_IOSIZE);            if (DbProxySend(dbhandle, ReadF, readRequest,			    strlen(readRequest)) != NS_OK) {                sprintf(errbuf, "Can't send ReadF command to Proxy Daemon");            } else if (DbProxyGetString(dbhandle, respbuf,					RSP_BUFSIZE) != NS_OK) {		                sprintf(errbuf, "Can't get ReadF status response "			"from Proxy Daemon");            } else if (strcasecmp(respbuf, OK_STATUS) != 0) {                strcpy(errbuf, respbuf);            } else if ((readInfo = DbProxyGetList(dbhandle)) == NULL) {                sprintf(errbuf, "Can't read data from Proxy Daemon");            } else {                readEl = Ns_ListFirst(readInfo);                if (readEl->size == 0) {                    status = NS_OK;                    done = 1;                } else if (readEl->size > 0) {                    readEl->size--;		    /*		     * ignore NULL added by DbProxyGetList		     */		                        if (write(localDestFd, readEl->data,			      readEl->size) != readEl->size) {			                        sprintf(errbuf, "Local write to %s failed: %s",				destFile, strerror(errno));                        status = NS_ERROR;                    } else {                        status = NS_OK;                        fileLoc += readEl->size;                    }                } else {		    /*		     * readEl->size < 0		     */		                        Ns_Log(Bug, "nsext: "			   "negative size from remote read");                    sprintf(errbuf,			    "Read error from Proxy Daemon (negative size)");                }                ns_free(readEl->data);                readEl->data = NULL;                Ns_ListFree(readInfo, (Ns_ElemVoidProc *) ExtFree);            }        }    }    if (localDestFd != -1) {        close(localDestFd);    }    if (remoteFdStr[0] != '\0') {	/*	 * close remote fd	 */	        status = NS_ERROR;        if (DbProxySend(dbhandle, CloseF, remoteFdStr,                strlen(remoteFdStr)) != NS_OK) {            sprintf(errbuf, "Can't send CloseF command to Proxy Daemon");        } else if (DbProxyGetString(dbhandle, respbuf, RSP_BUFSIZE) != NS_OK) {            sprintf(errbuf,		    "Can't get CloseF status response from Proxy Daemon");        } else if (strcasecmp(respbuf, OK_STATUS) != 0) {            strcpy(errbuf, respbuf);        } else {            status = NS_OK;        }    }    return status;}