Changeset bd1deed in mainline for kernel/generic/src/lib/memstr.c
- Timestamp:
- 2007-02-11T20:04:08Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c993e45
- Parents:
- ce8aed1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/memstr.c
rce8aed1 rbd1deed 75 75 } 76 76 77 return (char *) src;77 return (char *) src; 78 78 } 79 79 … … 93 93 uint8_t *p = (uint8_t *) dst; 94 94 95 for (i=0; i<cnt; i++)95 for (i = 0; i < cnt; i++) 96 96 p[i] = x; 97 97 } … … 112 112 uint16_t *p = (uint16_t *) dst; 113 113 114 for (i=0; i<cnt; i++)114 for (i = 0; i < cnt; i++) 115 115 p[i] = x; 116 } 117 118 /** Copy string 119 * 120 * Copy string from src address to dst address. 121 * The copying is done char-by-char until the null 122 * character. The source and destination memory areas 123 * cannot overlap. 124 * 125 * @param src Origin string to copy from. 126 * @param dst Origin string to copy to. 127 * 128 */ 129 char *strcpy(char *dest, const char *src) 130 { 131 char *orig = dest; 132 133 while ((*(dest++) = *(src++))); 134 return orig; 116 135 } 117 136
Note:
See TracChangeset
for help on using the changeset viewer.