Changeset 27833d8 in mainline
- Timestamp:
- 2011-02-25T23:50:19Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63e0bdd
- Parents:
- 5691653 (diff), 89e780d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/vfs/vfs.c
r5691653 r27833d8 69 69 char *ncwd_path; 70 70 char *ncwd_path_nc; 71 size_t total_size; 71 72 72 73 fibril_mutex_lock(&cwd_mutex); … … 77 78 return NULL; 78 79 } 79 ncwd_path_nc = malloc(cwd_size + 1 + size + 1); 80 total_size = cwd_size + 1 + size + 1; 81 ncwd_path_nc = malloc(total_size); 80 82 if (!ncwd_path_nc) { 81 83 fibril_mutex_unlock(&cwd_mutex); 82 84 return NULL; 83 85 } 84 str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);86 str_cpy(ncwd_path_nc, total_size, cwd_path); 85 87 ncwd_path_nc[cwd_size] = '/'; 86 88 ncwd_path_nc[cwd_size + 1] = '\0'; 87 89 } else { 88 ncwd_path_nc = malloc(size + 1); 90 total_size = size + 1; 91 ncwd_path_nc = malloc(total_size); 89 92 if (!ncwd_path_nc) { 90 93 fibril_mutex_unlock(&cwd_mutex); … … 93 96 ncwd_path_nc[0] = '\0'; 94 97 } 95 str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path);98 str_append(ncwd_path_nc, total_size, path); 96 99 ncwd_path = canonify(ncwd_path_nc, retlen); 97 100 if (!ncwd_path) { -
uspace/srv/fs/fat/fat_ops.c
r5691653 r27833d8 325 325 uint16_t_le2host(d->firstc)); 326 326 if (rc != EOK) { 327 (void) block_put(b); 327 328 (void) fat_node_put(FS_NODE(nodep)); 328 329 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.