Cleaned up a few compile complaints

This commit is contained in:
Mark Pizzolato 2012-04-27 12:11:12 -07:00
parent 8989b111c1
commit f77a38c3c5
4 changed files with 25 additions and 25 deletions

View file

@ -108,7 +108,7 @@ if ((expected_checksum != 0) && (checksum != expected_checksum)) {
* If the target include file already exists, determine if it contains the exact
* data in the base ROM image. If so, then we are already done
*/
if (iFile = fopen (include_filename, "r")) {
if (NULL != (iFile = fopen (include_filename, "r"))) {
unsigned char *IncludeData = NULL;
char line[256];
int Difference = 0;

View file

@ -2550,13 +2550,13 @@ static FILE *sim_vhd_disk_open (const char *szVHDPath, const char *DesiredAccess
if (!hVHD)
return (FILE *)hVHD;
if (Status = GetVHDFooter (szVHDPath,
if (0 != (Status = GetVHDFooter (szVHDPath,
&hVHD->Footer,
&hVHD->Dynamic,
&hVHD->BAT,
NULL,
hVHD->ParentVHDPath,
sizeof (hVHD->ParentVHDPath)))
sizeof (hVHD->ParentVHDPath))))
goto Cleanup_Return;
if (NtoHl (hVHD->Footer.DiskType) == VHD_DT_Differencing) {
hVHD->Parent = (VHDHANDLE)sim_vhd_disk_open (hVHD->ParentVHDPath, "rb");
@ -2702,7 +2702,7 @@ if (SizeInBytes > ((uint64)(1024*1024*1024))*2040) {
Status = EFBIG;
goto Cleanup_Return;
}
if (File = sim_fopen (szVHDPath, "rb")) {
if (NULL != (File = sim_fopen (szVHDPath, "rb"))) {
fclose (File);
File = NULL;
Status = EEXIST;
@ -2877,13 +2877,13 @@ char *FullVHDPath = NULL;
size_t i, RelativeMatch, UpDirectories, LocatorsWritten = 0;
int64 LocatorPosition;
if (Status = GetVHDFooter (szParentVHDPath,
if (0 != (Status = GetVHDFooter (szParentVHDPath,
&ParentFooter,
&ParentDynamic,
NULL,
&ParentTimeStamp,
NULL,
0))
0)))
goto Cleanup_Return;
hVHD = CreateVirtualDisk (szVHDPath,
(uint32)(NtoHll(ParentFooter.CurrentSize)/BytesPerSector),

View file

@ -664,7 +664,7 @@ void eth_zero(ETH_DEV* dev)
}
static ETH_DEV **eth_open_devices = NULL;
static eth_open_device_count = 0;
static int eth_open_device_count = 0;
static void _eth_add_to_open_list (ETH_DEV* dev)
{
@ -1394,7 +1394,7 @@ static void eth_get_nic_hw_addr(ETH_DEV* dev, char *devname)
for (i=0; patterns[i] && (0 == dev->have_host_nic_phy_addr); ++i) {
snprintf(command, sizeof(command)-1, "ifconfig %s | %s >NIC.hwaddr", devname, patterns[i]);
system(command);
if (f = fopen("NIC.hwaddr", "r")) {
if (NULL != (f = fopen("NIC.hwaddr", "r"))) {
while (0 == dev->have_host_nic_phy_addr) {
if (fgets(command, sizeof(command)-1, f)) {
char *p1, *p2;
@ -1580,7 +1580,7 @@ sim_debug(dev->dbit, dev->dptr, "Writer Thread Starting\n");
pthread_mutex_lock (&dev->writer_lock);
while (dev->handle) {
pthread_cond_wait (&dev->writer_cond, &dev->writer_lock);
while (request = dev->write_requests) {
while (NULL != (request = dev->write_requests)) {
/* Pull buffer off request list */
dev->write_requests = request->next;
pthread_mutex_unlock (&dev->writer_lock);
@ -1889,11 +1889,11 @@ pthread_mutex_destroy (&dev->writer_lock);
pthread_cond_destroy (&dev->writer_cond);
if (1) {
struct write_request *buffer;
while (buffer = dev->write_buffers) {
while (NULL != (buffer = dev->write_buffers)) {
dev->write_buffers = buffer->next;
free(buffer);
}
while (buffer = dev->write_requests) {
while (NULL != (buffer = dev->write_requests)) {
dev->write_requests = buffer->next;
free(buffer);
}
@ -2146,10 +2146,10 @@ if (!dev) return SCPE_UNATT;
/* Get a buffer */
pthread_mutex_lock (&dev->writer_lock);
if (request = dev->write_buffers)
if (NULL != (request = dev->write_buffers))
dev->write_buffers = request->next;
pthread_mutex_unlock (&dev->writer_lock);
if (!request)
if (NULL == request)
request = malloc(sizeof(*request));
/* Copy buffer contents */

View file

@ -761,7 +761,7 @@ t_stat st;
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecf(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
opos = uptr->pos; /* old position */
if (st = sim_tape_rdlntf (uptr, &tbc)) /* read rec lnt */
if (MTSE_OK != (st = sim_tape_rdlntf (uptr, &tbc))) /* read rec lnt */
return st;
*bc = rbc = MTR_L (tbc); /* strip error flag */
if (rbc > max) { /* rec out of range? */
@ -823,7 +823,7 @@ t_stat st;
sim_debug (ctx->dbit, ctx->dptr, "sim_tape_rdrecr(unit=%d, buf=%p, max=%d)\n", uptr-ctx->dptr->units, buf, max);
if (st = sim_tape_rdlntr (uptr, &tbc)) /* read rec lnt */
if (MTSE_OK != (st = sim_tape_rdlntr (uptr, &tbc))) /* read rec lnt */
return st;
*bc = rbc = MTR_L (tbc); /* strip error flag */
if (rbc > max) /* rec out of range? */