Don't compare '\0' against pointers.
Add a note from Fabrice in slow_st template. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3669 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									f610349f36
								
							
						
					
					
						commit
						6c41b2723f
					
				@ -282,6 +282,8 @@ static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr,
 | 
				
			|||||||
        } else if (((addr & ~TARGET_PAGE_MASK) + DATA_SIZE - 1) >= TARGET_PAGE_SIZE) {
 | 
					        } else if (((addr & ~TARGET_PAGE_MASK) + DATA_SIZE - 1) >= TARGET_PAGE_SIZE) {
 | 
				
			||||||
        do_unaligned_access:
 | 
					        do_unaligned_access:
 | 
				
			||||||
            /* XXX: not efficient, but simple */
 | 
					            /* XXX: not efficient, but simple */
 | 
				
			||||||
 | 
					            /* Note: relies on the fact that tlb_fill() does not remove the
 | 
				
			||||||
 | 
					             * previous page from the TLB cache.  */
 | 
				
			||||||
            for(i = DATA_SIZE - 1; i >= 0; i--) {
 | 
					            for(i = DATA_SIZE - 1; i >= 0; i--) {
 | 
				
			||||||
#ifdef TARGET_WORDS_BIGENDIAN
 | 
					#ifdef TARGET_WORDS_BIGENDIAN
 | 
				
			||||||
                glue(slow_stb, MMUSUFFIX)(addr + i, val >> (((DATA_SIZE - 1) * 8) - (i * 8)),
 | 
					                glue(slow_stb, MMUSUFFIX)(addr + i, val >> (((DATA_SIZE - 1) * 8) - (i * 8)),
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								vl.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								vl.c
									
									
									
									
									
								
							@ -8259,17 +8259,17 @@ int main(int argc, char **argv)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    /* XXX: this should not be: some embedded targets just have flash */
 | 
					    /* XXX: this should not be: some embedded targets just have flash */
 | 
				
			||||||
    if (!linux_boot && net_boot == 0 &&
 | 
					    if (!linux_boot && net_boot == 0 &&
 | 
				
			||||||
        hd_filename[0] == '\0' &&
 | 
					        hd_filename[0] == NULL &&
 | 
				
			||||||
        (cdrom_index >= 0 && hd_filename[cdrom_index] == '\0') &&
 | 
					        (cdrom_index >= 0 && hd_filename[cdrom_index] == NULL) &&
 | 
				
			||||||
        fd_filename[0] == '\0' &&
 | 
					        fd_filename[0] == NULL &&
 | 
				
			||||||
        pflash_filename[0] == '\0')
 | 
					        pflash_filename[0] == NULL)
 | 
				
			||||||
        help(1);
 | 
					        help(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* boot to floppy or the default cd if no hard disk defined yet */
 | 
					    /* boot to floppy or the default cd if no hard disk defined yet */
 | 
				
			||||||
    if (!boot_devices[0]) {
 | 
					    if (!boot_devices[0]) {
 | 
				
			||||||
        if (hd_filename[0] != '\0')
 | 
					        if (hd_filename[0] != NULL)
 | 
				
			||||||
            boot_devices = "c";
 | 
					            boot_devices = "c";
 | 
				
			||||||
        else if (fd_filename[0] != '\0')
 | 
					        else if (fd_filename[0] != NULL)
 | 
				
			||||||
            boot_devices = "a";
 | 
					            boot_devices = "a";
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            boot_devices = "d";
 | 
					            boot_devices = "d";
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user