Changeset c6c389ed in mainline for uspace/srv/devman/util.h
- Timestamp:
- 2010-10-23T16:08:18Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 791f58c
- Parents:
- 58b833c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/util.h
r58b833c rc6c389ed 52 52 size_t len = 0; 53 53 54 while(*str != 0&& !isspace(*str)) {54 while(*str != '\0' && !isspace(*str)) { 55 55 len++; 56 56 str++; 57 57 } 58 58 59 return len; 59 60 } … … 61 62 static inline void free_not_null(const void *ptr) 62 63 { 63 if ( NULL != ptr)64 if (ptr != NULL) 64 65 free(ptr); 65 66 } … … 71 72 72 73 str = (char *) malloc(size); 73 if ( NULL != str)74 if (str != NULL) 74 75 str_cpy(str, size, s); 75 76 return str; … … 79 80 { 80 81 while (*str) { 81 if ( orig == *str)82 if (*str == orig) 82 83 *str = repl; 83 84 str++;
Note:
See TracChangeset
for help on using the changeset viewer.