Changeset 523 for trunk/boot/tsar_mips32/boot_utils.c
- Timestamp:
- Aug 30, 2018, 6:45:18 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/boot/tsar_mips32/boot_utils.c
r521 r523 284 284 void boot_strcpy( char * dest, const char * src) 285 285 { 286 /* Checking if the arguments are correct. */287 if ((dest == NULL) || (src == NULL))288 return;289 290 286 /* Copying the string. */ 291 287 while ((*dest++ = *src++) != '\0'); … … 297 293 { 298 294 uint32_t res = 0; /* Length of the string (in bytes). */ 299 300 if (s != NULL) 301 { 302 while (*s++ != '\0') 303 res++; 295 while (*s++ != '\0') { 296 res++; 304 297 } 305 298 306 299 return res; 307 308 300 } // boot_strlen() 309 301 … … 311 303 int boot_strcmp( const char * s1, const char * s2 ) 312 304 { 313 if ( (s1 == NULL) || (s2 == NULL))305 if (s1 == s2) 314 306 return 0; 315 307
Note: See TracChangeset
for help on using the changeset viewer.