From: Russ D. <ru...@us...> - 2003-11-27 01:05:14
|
Update of /cvsroot/blob/blob/src/blob In directory sc8-pr-cvs1:/tmp/cvs-serv13346 Modified Files: cramfs.c bootldrpart.c Log Message: simplify the simple strncmp cases Index: cramfs.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/cramfs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- cramfs.c 27 Apr 2002 07:32:40 -0000 1.4 +++ cramfs.c 27 Nov 2003 01:05:11 -0000 1.5 @@ -136,7 +136,7 @@ name = (char *) (inode + 1); /* FIXME - should use "filename" */ - if (!strncmp("linux\0\0", name, 8)) { + if (!strcmp("linux\0\0", name)) { size = cramfs_load_file(dest, part, inode); break; } Index: bootldrpart.c =================================================================== RCS file: /cvsroot/blob/blob/src/blob/bootldrpart.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- bootldrpart.c 13 Feb 2002 00:17:32 -0000 1.3 +++ bootldrpart.c 27 Nov 2003 01:05:11 -0000 1.4 @@ -159,16 +159,14 @@ ptable->partition[i].flags |= PART_EXPAND; /* NOTE: this is a hack -- Erik */ - if(strncmp(ptable->partition[i].name, "kernel", - PART_PARTITION_NAMELEN) == 0) { + if(strcmp(ptable->partition[i].name, "kernel") == 0) { ptable->partition[i].mem_base = KERNEL_RAM_BASE; ptable->partition[i].entry_point = KERNEL_RAM_BASE; ptable->partition[i].flags |= PART_LOAD; } /* NOTE: and this is a hack as well -- Erik */ - if(strncmp(ptable->partition[i].name, "ramdisk", - PART_PARTITION_NAMELEN) == 0) { + if(strcmp(ptable->partition[i].name, "ramdisk") == 0) { ptable->partition[i].mem_base = RAMDISK_RAM_BASE; ptable->partition[i].flags |= PART_LOAD; } |