Changeset 84239b1 in mainline for uspace/lib
- Timestamp:
- 2018-03-11T19:39:11Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f3d47c97
- Parents:
- 850fd32
- Location:
- uspace/lib
- Files:
-
- 12 edited
-
bithenge/src/compound.c (modified) (1 diff)
-
bithenge/src/print.c (modified) (1 diff)
-
bithenge/src/sequence.c (modified) (1 diff)
-
c/generic/device/hw_res_parsed.c (modified) (3 diffs)
-
c/generic/io/printf_core.c (modified) (6 diffs)
-
ext4/src/balloc.c (modified) (2 diffs)
-
ext4/src/extent.c (modified) (6 diffs)
-
ext4/src/ops.c (modified) (4 diffs)
-
hound/src/protocol.c (modified) (15 diffs)
-
math/include/mathtypes.h (modified) (12 diffs)
-
nic/src/nic_driver.c (modified) (2 diffs)
-
pcm/src/format.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/src/compound.c
r850fd32 r84239b1 70 70 71 71 /* i ranges from (self->num - 1) to 0 inside the loop. */ 72 for (size_t i = self->num; i--; ) { 72 size_t i = self->num; 73 while (i-- != 0) { 73 74 bithenge_node_t *tmp; 74 75 rc = bithenge_transform_apply(self->xforms[i], scope, in, -
uspace/lib/bithenge/src/print.c
r850fd32 r84239b1 162 162 const char *value = bithenge_string_node_value(node); 163 163 state_printf(state, "\""); 164 for (string_iterator_t i = string_iterator(value); !string_iterator_done(&i); ) { 164 string_iterator_t i = string_iterator(value); 165 while (!string_iterator_done(&i)) { 165 166 wchar_t ch; 166 167 errno_t rc = string_iterator_next(&i, &ch); -
uspace/lib/bithenge/src/sequence.c
r850fd32 r84239b1 607 607 self->subtransforms = subtransforms; 608 608 self->num_subtransforms = 0; 609 for (self->num_subtransforms = 0; 610 subtransforms[self->num_subtransforms].transform; 611 self->num_subtransforms++); 609 while (subtransforms[self->num_subtransforms].transform) 610 self->num_subtransforms++; 612 611 *out = struct_as_transform(self); 613 612 return EOK; -
uspace/lib/c/generic/device/hw_res_parsed.c
r850fd32 r84239b1 167 167 size_t s_size; 168 168 169 s_address = RNGABS(out->mem_ranges.ranges[i]); ;169 s_address = RNGABS(out->mem_ranges.ranges[i]); 170 170 s_size = RNGSZ(out->mem_ranges.ranges[i]); 171 171 … … 237 237 238 238 return EOK; 239 } ;239 } 240 240 241 241 /** Get hw_resources from the parent device. … … 279 279 280 280 return rc; 281 } ;281 } 282 282 283 283 /** @} -
uspace/lib/c/generic/io/printf_core.c
r850fd32 r84239b1 1517 1517 counter += retval; 1518 1518 j = nxt; 1519 goto next_char;1519 continue; 1520 1520 case 'c': 1521 1521 if (qualifier == PrintfQualifierLong) … … 1527 1527 counter = -counter; 1528 1528 goto out; 1529 } ;1529 } 1530 1530 1531 1531 counter += retval; 1532 1532 j = nxt; 1533 goto next_char;1533 continue; 1534 1534 1535 1535 /* … … 1552 1552 counter += retval; 1553 1553 j = nxt; 1554 goto next_char;1554 continue; 1555 1555 1556 1556 /* … … 1589 1589 case '%': 1590 1590 j = i; 1591 goto next_char;1591 continue; 1592 1592 1593 1593 /* … … 1599 1599 * so we will print whole bad format sequence. 1600 1600 */ 1601 goto next_char;1601 continue; 1602 1602 } 1603 1603 … … 1655 1655 j = nxt; 1656 1656 } 1657 next_char:1658 ;1659 1657 } 1660 1658 -
uspace/lib/ext4/src/balloc.c
r850fd32 r84239b1 352 352 uint32_t free_blocks; 353 353 uint32_t goal; 354 uint32_t block_size; 354 355 355 356 /* Find GOAL */ … … 585 586 586 587 success: 587 /* Empty command - because of syntax */ 588 ; 589 590 uint32_t block_size = ext4_superblock_get_block_size(sb); 588 block_size = ext4_superblock_get_block_size(sb); 591 589 592 590 /* Update superblock free blocks count */ -
uspace/lib/ext4/src/extent.c
r850fd32 r84239b1 476 476 uint16_t pos = 0; 477 477 errno_t rc; 478 errno_t rc2; 478 479 while (ext4_extent_header_get_depth(eh) != 0) { 479 480 /* Search index in index node by iblock */ … … 513 514 514 515 cleanup: 515 ; 516 517 errno_t rc2 = EOK; 516 rc2 = EOK; 518 517 519 518 /* … … 623 622 /* Find the first extent to modify */ 624 623 ext4_extent_path_t *path; 624 errno_t rc2; 625 625 errno_t rc = ext4_extent_find_extent(inode_ref, iblock_from, &path); 626 626 if (rc != EOK) … … 734 734 735 735 cleanup: 736 ; 737 738 errno_t rc2 = EOK; 736 rc2 = EOK; 739 737 740 738 /* … … 982 980 /* Load the nearest leaf (with extent) */ 983 981 ext4_extent_path_t *path; 982 errno_t rc2; 984 983 errno_t rc = ext4_extent_find_extent(inode_ref, new_block_idx, &path); 985 984 if (rc != EOK) … … 1086 1085 1087 1086 finish: 1088 ; 1089 1090 errno_t rc2 = EOK; 1087 rc2 = EOK; 1091 1088 1092 1089 /* Set return values */ -
uspace/lib/ext4/src/ops.c
r850fd32 r84239b1 219 219 ext4_node_t *eparent = EXT4_NODE(pfn); 220 220 ext4_filesystem_t *fs = eparent->instance->filesystem; 221 errno_t rc2; 221 222 222 223 if (!ext4_inode_is_type(fs->superblock, eparent->inode_ref->inode, … … 244 245 245 246 exit: 246 ;247 248 247 /* Destroy search result structure */ 249 errno_t constrc2 = ext4_directory_destroy_result(&result);248 rc2 = ext4_directory_destroy_result(&result); 250 249 return rc == EOK ? rc2 : rc; 251 250 } … … 1279 1278 { 1280 1279 fs_node_t *fn; 1280 errno_t rc2; 1281 1281 errno_t rc = ext4_node_get(&fn, service_id, index); 1282 1282 if (rc != EOK) … … 1395 1395 1396 1396 exit: 1397 ; 1398 1399 errno_t const rc2 = ext4_node_put(fn); 1397 rc2 = ext4_node_put(fn); 1400 1398 return rc == EOK ? rc2 : rc; 1401 1399 } -
uspace/lib/hound/src/protocol.c
r850fd32 r84239b1 73 73 uint8_t channels; 74 74 uint8_t format; 75 } f __attribute__((packed));75 } __attribute__((packed)) f; 76 76 sysarg_t arg; 77 77 } format_convert_t; … … 385 385 void hound_connection_handler(ipc_callid_t iid, ipc_call_t *icall, void *arg) 386 386 { 387 hound_context_id_t id; 388 errno_t ret; 389 int flags; 390 void *source; 391 void *sink; 392 387 393 /* Accept connection if there is a valid iface*/ 388 394 if (server_iface) { … … 397 403 ipc_callid_t callid = async_get_call(&call); 398 404 switch (IPC_GET_IMETHOD(call)) { 399 case IPC_M_HOUND_CONTEXT_REGISTER: {405 case IPC_M_HOUND_CONTEXT_REGISTER: 400 406 /* check interface functions */ 401 407 if (!server_iface || !server_iface->add_context) { … … 407 413 408 414 /* Get context name */ 409 errno_t ret = 410 async_data_write_accept(&name, true, 0, 0, 0, 0); 415 ret = async_data_write_accept(&name, true, 0, 0, 0, 0); 411 416 if (ret != EOK) { 412 417 async_answer_0(callid, ret); 413 418 break; 414 419 } 415 hound_context_id_t id = 0; 420 421 id = 0; 416 422 ret = server_iface->add_context(server_iface->server, 417 423 &id, name, record); … … 424 430 } 425 431 break; 426 } 427 case IPC_M_HOUND_CONTEXT_UNREGISTER: { 432 case IPC_M_HOUND_CONTEXT_UNREGISTER: 428 433 /* check interface functions */ 429 434 if (!server_iface || !server_iface->rem_context) { … … 433 438 434 439 /* get id, 1st param */ 435 hound_context_id_tid = IPC_GET_ARG1(call);436 const errno_t ret =437 server_iface->rem_context(server_iface->server,id);440 id = IPC_GET_ARG1(call); 441 ret = server_iface->rem_context(server_iface->server, 442 id); 438 443 async_answer_0(callid, ret); 439 444 break; 440 } 441 case IPC_M_HOUND_GET_LIST: { 445 case IPC_M_HOUND_GET_LIST: 442 446 /* check interface functions */ 443 447 if (!server_iface || !server_iface->get_list) { … … 447 451 448 452 char **list = NULL; 449 const intflags = IPC_GET_ARG1(call);453 flags = IPC_GET_ARG1(call); 450 454 size_t count = IPC_GET_ARG2(call); 451 455 const bool conn = IPC_GET_ARG3(call); 452 456 char *conn_name = NULL; 453 errno_tret = EOK;457 ret = EOK; 454 458 455 459 /* get connected actor name if provided */ … … 501 505 free(list); 502 506 break; 503 } 504 case IPC_M_HOUND_CONNECT: { 507 case IPC_M_HOUND_CONNECT: 505 508 /* check interface functions */ 506 509 if (!server_iface || !server_iface->connect) { … … 509 512 } 510 513 511 void *source = NULL;512 void *sink = NULL;514 source = NULL; 515 sink = NULL; 513 516 514 517 /* read source name */ 515 errno_t ret =516 async_data_write_accept(&source, true, 0, 0, 0,0);518 ret = async_data_write_accept(&source, true, 0, 0, 0, 519 0); 517 520 /* read sink name */ 518 521 if (ret == EOK) … … 527 530 async_answer_0(callid, ret); 528 531 break; 529 } 530 case IPC_M_HOUND_DISCONNECT: { 532 case IPC_M_HOUND_DISCONNECT: 531 533 /* check interface functions */ 532 534 if (!server_iface || !server_iface->disconnect) { … … 535 537 } 536 538 537 void *source = NULL;538 void *sink = NULL;539 source = NULL; 540 sink = NULL; 539 541 540 542 /* read source name */ 541 errno_t ret =542 async_data_write_accept(&source, true, 0, 0, 0,0);543 ret = async_data_write_accept(&source, true, 0, 0, 0, 544 0); 543 545 /*read sink name */ 544 546 if (ret == EOK) … … 552 554 async_answer_0(callid, ret); 553 555 break; 554 } 555 case IPC_M_HOUND_STREAM_ENTER: { 556 case IPC_M_HOUND_STREAM_ENTER: 556 557 /* check interface functions */ 557 558 if (!server_iface || !server_iface->is_record_context … … 563 564 564 565 /* get parameters */ 565 hound_context_id_tid = IPC_GET_ARG1(call);566 const intflags = IPC_GET_ARG2(call);566 id = IPC_GET_ARG1(call); 567 flags = IPC_GET_ARG2(call); 567 568 const format_convert_t c = {.arg = IPC_GET_ARG3(call)}; 568 569 const pcm_format_t f = { … … 574 575 575 576 void *stream; 576 errno_tret = server_iface->add_stream(server_iface->server,577 ret = server_iface->add_stream(server_iface->server, 577 578 id, flags, f, bsize, &stream); 578 579 if (ret != EOK) { … … 604 605 } 605 606 break; 606 }607 607 case IPC_M_HOUND_STREAM_EXIT: 608 608 case IPC_M_HOUND_STREAM_DRAIN: -
uspace/lib/math/include/mathtypes.h
r850fd32 r84239b1 96 96 uint32_t exp : 8; 97 97 uint32_t fraction : 23; 98 } parts __attribute__((packed));98 } __attribute__((packed)) parts; 99 99 } float32; 100 100 … … 106 106 uint64_t exp : 11; 107 107 uint64_t fraction : 52; 108 } parts __attribute__((packed));108 } __attribute__((packed)) parts; 109 109 } float64; 110 110 … … 113 113 uint64_t hi; 114 114 uint32_t lo; 115 } bin __attribute__((packed));115 } __attribute__((packed)) bin; 116 116 117 117 struct { … … 120 120 uint64_t exp : 15; 121 121 uint64_t fraction : 64; 122 } parts __attribute__((packed));122 } __attribute__((packed)) parts; 123 123 } float96; 124 124 … … 127 127 uint64_t hi; 128 128 uint64_t lo; 129 } bin __attribute__((packed));129 } __attribute__((packed)) bin; 130 130 131 131 struct { … … 134 134 uint64_t frac_hi : 48; 135 135 uint64_t frac_lo : 64; 136 } parts __attribute__((packed));136 } __attribute__((packed)) parts; 137 137 } float128; 138 138 … … 146 146 uint32_t exp : 8; 147 147 uint32_t sign : 1; 148 } parts __attribute__((packed));148 } __attribute__((packed)) parts; 149 149 } float32; 150 150 … … 156 156 uint64_t exp : 11; 157 157 uint64_t sign : 1; 158 } parts __attribute__((packed));158 } __attribute__((packed)) parts; 159 159 } float64; 160 160 … … 163 163 uint32_t lo; 164 164 uint64_t hi; 165 } bin __attribute__((packed));165 } __attribute__((packed)) bin; 166 166 167 167 struct { … … 170 170 uint64_t sign : 1; 171 171 uint64_t padding : 16; 172 } parts __attribute__((packed));172 } __attribute__((packed)) parts; 173 173 } float96; 174 174 … … 177 177 uint64_t lo; 178 178 uint64_t hi; 179 } bin __attribute__((packed));179 } __attribute__((packed)) bin; 180 180 181 181 struct { … … 184 184 uint64_t exp : 15; 185 185 uint64_t sign : 1; 186 } parts __attribute__((packed));186 } __attribute__((packed)) parts; 187 187 } float128; 188 188 -
uspace/lib/nic/src/nic_driver.c
r850fd32 r84239b1 389 389 *period = nic_data->poll_period; 390 390 return nic_data->poll_mode; 391 } ;391 } 392 392 393 393 /** Inform the NICF about poll mode … … 487 487 488 488 memcpy(addr, &nic_data->mac, sizeof(nic_address_t)); 489 } ;489 } 490 490 491 491 /** -
uspace/lib/pcm/src/format.c
r850fd32 r84239b1 304 304 case PCM_SAMPLE_SINT24_BE: 305 305 case PCM_SAMPLE_FLOAT32: 306 default: ; 306 default: 307 break; 307 308 } 308 309 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
