Changeset 3bacee1 in mainline for uspace/srv


Ignore:
Timestamp:
2018-04-12T16:27:17Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/srv
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/audio/hound/audio_data.c

    r76d0981d r3bacee1  
    103103 * @return valid pointer to data link structure, NULL on failure.
    104104 */
    105 static inline audio_data_link_t * audio_data_link_list_instance(link_t *l)
     105static inline audio_data_link_t *audio_data_link_list_instance(link_t *l)
    106106{
    107107        return l ? list_get_instance(l, audio_data_link_t, link) : NULL;
     
    144144 * @return pointer to the beginning of data buffer.
    145145 */
    146 static inline const void * audio_data_link_start(audio_data_link_t *alink)
     146static inline const void *audio_data_link_start(audio_data_link_t *alink)
    147147{
    148148        assert(alink);
  • uspace/srv/audio/hound/hound_ctx.c

    r76d0981d r3bacee1  
    209209        fibril_mutex_lock(&stream->guard);
    210210        if (stream->allowed_size &&
    211             (audio_pipe_bytes(&stream->fifo) + adata->size
    212                 > stream->allowed_size)) {
     211            (audio_pipe_bytes(&stream->fifo) + adata->size >
     212            stream->allowed_size)) {
    213213                fibril_mutex_unlock(&stream->guard);
    214214                return EOVERFLOW;
     
    246246 */
    247247hound_ctx_stream_t *hound_ctx_create_stream(hound_ctx_t *ctx, int flags,
    248         pcm_format_t format, size_t buffer_size)
     248    pcm_format_t format, size_t buffer_size)
    249249{
    250250        assert(ctx);
     
    308308        while (stream->allowed_size &&
    309309            (audio_pipe_bytes(&stream->fifo) + size > stream->allowed_size)) {
    310             fibril_condvar_wait(&stream->change, &stream->guard);
     310                fibril_condvar_wait(&stream->change, &stream->guard);
    311311
    312312        }
     
    336336        fibril_mutex_lock(&stream->guard);
    337337        while (audio_pipe_bytes(&stream->fifo) < size) {
    338             fibril_condvar_wait(&stream->change, &stream->guard);
     338                fibril_condvar_wait(&stream->change, &stream->guard);
    339339        }
    340340
     
    466466                if (ret != EOK)
    467467                        log_error("Failed to push data to stream: %s",
    468                                 str_error(ret));
     468                            str_error(ret));
    469469        }
    470470        audio_data_unref(adata);
  • uspace/srv/fs/cdfs/cdfs_ops.c

    r76d0981d r3bacee1  
    282282typedef struct {
    283283        service_id_t service_id;
    284     fs_index_t index;
     284        fs_index_t index;
    285285} ht_key_t;
    286286
    287287static size_t nodes_key_hash(void *k)
    288288{
    289         ht_key_t *key = (ht_key_t*)k;
     289        ht_key_t *key = (ht_key_t *)k;
    290290        return hash_combine(key->service_id, key->index);
    291291}
     
    300300{
    301301        cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link);
    302         ht_key_t *key = (ht_key_t*)k;
     302        ht_key_t *key = (ht_key_t *)k;
    303303
    304304        return key->service_id == node->fs->service_id && key->index == node->index;
     
    12081208static bool rm_service_id_nodes(ht_link_t *item, void *arg)
    12091209{
    1210         service_id_t service_id = *(service_id_t*)arg;
     1210        service_id_t service_id = *(service_id_t *)arg;
    12111211        cdfs_node_t *node = hash_table_get_inst(item, cdfs_node_t, nh_link);
    12121212
     
    13451345static bool cache_remove_closed(ht_link_t *item, void *arg)
    13461346{
    1347         size_t *premove_cnt = (size_t*)arg;
     1347        size_t *premove_cnt = (size_t *)arg;
    13481348
    13491349        /* Some nodes were requested to be removed from the cache. */
  • uspace/srv/hid/input/input.c

    r76d0981d r3bacee1  
    308308        /* Mutual exclusion of active clients */
    309309        list_foreach(clients, link, client_t, client)
    310                 client->active = ((active) && (client == active_client));
     310            client->active = ((active) && (client == active_client));
    311311
    312312        /* Notify clients about the arbitration */
  • uspace/srv/hid/output/port/kfb.c

    r76d0981d r3bacee1  
    490490        size_t word_size = sizeof(unsigned long);
    491491
    492         if (((word_size % kfb.pixel_bytes) == 0)
    493             && ((FONT_WIDTH * kfb.pixel_bytes) % word_size == 0)
    494             && ((vp->x * kfb.pixel_bytes) % word_size == 0)
    495             && (kfb.scanline % word_size == 0))
     492        if (((word_size % kfb.pixel_bytes) == 0) &&
     493            ((FONT_WIDTH * kfb.pixel_bytes) % word_size == 0) &&
     494            ((vp->x * kfb.pixel_bytes) % word_size == 0) &&
     495            (kfb.scanline % word_size == 0))
    496496                kfb_vp->draw_char = draw_char_aligned;
    497497        else
  • uspace/srv/loader/main.c

    r76d0981d r3bacee1  
    145145        }
    146146
    147         char* name = malloc(namesize);
     147        char *name = malloc(namesize);
    148148        errno_t rc = async_data_write_finalize(write_chandle, name, namesize);
    149149        if (rc != EOK) {
     
    248248        }
    249249
    250         char* name = malloc(namesize);
     250        char *name = malloc(namesize);
    251251        errno_t rc = async_data_write_finalize(write_chandle, name, namesize);
    252252        if (rc != EOK) {
  • uspace/srv/locsrv/locsrv.c

    r76d0981d r3bacee1  
    217217
    218218        list_foreach(services_list, services, loc_service_t, service) {
    219                 if ((str_cmp(service->namespace->name, ns_name) == 0)
    220                     && (str_cmp(service->name, name) == 0))
     219                if ((str_cmp(service->namespace->name, ns_name) == 0) &&
     220                    (str_cmp(service->name, name) == 0))
    221221                        return service;
    222222        }
  • uspace/srv/net/dnsrsrv/dns_msg.c

    r76d0981d r3bacee1  
    383383        question->qtype = dns_uint16_t_decode(pdu->data + name_eoff,
    384384            pdu->size - name_eoff);
    385         question->qclass = dns_uint16_t_decode(pdu->data + sizeof(uint16_t)
    386             + name_eoff, pdu->size - sizeof(uint16_t) - name_eoff);
     385        question->qclass = dns_uint16_t_decode(pdu->data + sizeof(uint16_t) +
     386            name_eoff, pdu->size - sizeof(uint16_t) - name_eoff);
    387387        *eoff = name_eoff + 2 * sizeof(uint16_t);
    388388
     
    449449
    450450        log_msg(LOG_DEFAULT, LVL_DEBUG2, "dns_rr_decode: rtype=0x%x, rclass=0x%x, ttl=0x%x",
    451             rr->rtype, rr->rclass, rr->ttl );
     451            rr->rtype, rr->rclass, rr->ttl);
    452452
    453453        rdlength = dns_uint16_t_decode(bp, bsz);
     
    510510            (msg->rd ? BIT_V(uint16_t, OPB_RD) : 0) |
    511511            (msg->ra ? BIT_V(uint16_t, OPB_RA) : 0) |
    512             msg->rcode
    513         );
     512            msg->rcode);
    514513
    515514        hdr.qd_count = host2uint16_t_be(list_count(&msg->question));
  • uspace/srv/net/ethip/pdu.c

    r76d0981d r3bacee1  
    124124
    125125        switch (packet->opcode) {
    126         case aop_request: fopcode = AOP_REQUEST; break;
    127         case aop_reply: fopcode = AOP_REPLY; break;
     126        case aop_request:
     127                fopcode = AOP_REQUEST;
     128                break;
     129        case aop_reply:
     130                fopcode = AOP_REPLY;
     131                break;
    128132        default:
    129133                assert(false);
     
    187191
    188192        switch (uint16_t_be2host(pfmt->opcode)) {
    189         case AOP_REQUEST: packet->opcode = aop_request; break;
    190         case AOP_REPLY: packet->opcode = aop_reply; break;
     193        case AOP_REQUEST:
     194                packet->opcode = aop_request;
     195                break;
     196        case AOP_REPLY:
     197                packet->opcode = aop_reply;
     198                break;
    191199        default:
    192200                log_msg(LOG_DEFAULT, LVL_DEBUG, "Invalid ARP opcode (%" PRIu16 ")",
  • uspace/srv/net/inetsrv/pdu.c

    r76d0981d r3bacee1  
    7272
    7373        for (i = 0; i < words; i++) {
    74                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     74                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7575                sum = inet_ocadd16(sum, w);
    7676        }
    7777
    7878        if (size % 2 != 0) {
    79                 w = ((uint16_t)bdata[2*words] << 8);
     79                w = ((uint16_t)bdata[2 * words] << 8);
    8080                sum = inet_ocadd16(sum, w);
    8181        }
  • uspace/srv/net/slip/slip.c

    r76d0981d r3bacee1  
    284284                 */
    285285
    286 pass:
     286        pass:
    287287                rc = iplink_ev_recv(&slip_iplink, &sdu, ip_v4);
    288288                if (rc != EOK) {
     
    374374        if (rc != EOK) {
    375375                log_msg(LOG_DEFAULT, LVL_ERROR,
    376                    "Failed to register service %s",
    377                    linkstr);
     376                    "Failed to register service %s",
     377                    linkstr);
    378378                goto fail;
    379379        }
  • uspace/srv/net/tcp/conn.c

    r76d0981d r3bacee1  
    156156
    157157        /* Initialize retransmission queue */
    158         if (tcp_tqueue_init(&conn->retransmit, conn, &tcp_conn_tqueue_cb)
    159             != EOK) {
     158        if (tcp_tqueue_init(&conn->retransmit, conn, &tcp_conn_tqueue_cb) !=
     159            EOK) {
    160160                goto error;
    161161        }
  • uspace/srv/net/tcp/inet.c

    r76d0981d r3bacee1  
    9797        if (hdr_size < sizeof(tcp_header_t)) {
    9898                log_msg(LOG_DEFAULT, LVL_WARN, "hdr_size = %zu < sizeof(tcp_header_t) = %zu",
    99                     hdr_size, sizeof(tcp_header_t));            return EINVAL;
     99                    hdr_size, sizeof(tcp_header_t));
     100                return EINVAL;
    100101        }
    101102
  • uspace/srv/net/tcp/pdu.c

    r76d0981d r3bacee1  
    7373
    7474        for (i = 0; i < words; i++) {
    75                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     75                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7676                sum = tcp_ocadd16(sum, w);
    7777        }
    7878
    7979        if (size % 2 != 0) {
    80                 w = ((uint16_t)bdata[2*words] << 8);
     80                w = ((uint16_t)bdata[2 * words] << 8);
    8181                sum = tcp_ocadd16(sum, w);
    8282        }
  • uspace/srv/net/tcp/seq_no.c

    r76d0981d r3bacee1  
    170170
    171171        /* Beginning of segment is inside window */
    172         b_in = seq_no_le_lt(conn->rcv_nxt, seg->seq, conn->rcv_nxt
    173             + conn->rcv_wnd);
     172        b_in = seq_no_le_lt(conn->rcv_nxt, seg->seq, conn->rcv_nxt +
     173            conn->rcv_wnd);
    174174
    175175        /* End of segment is inside window */
  • uspace/srv/net/tcp/test/conn.c

    r76d0981d r3bacee1  
    139139
    140140        while (conn->cstate == st_syn_sent)
    141                 fibril_condvar_wait(&conn->cstate_cv, &conn->lock);
     141                fibril_condvar_wait(&conn->cstate_cv, &conn->lock);
    142142
    143143        PCUT_ASSERT_INT_EQUALS(st_closed, conn->cstate);
     
    194194        /* Wait for client-side state to transition */
    195195        while (cconn->cstate == st_syn_sent)
    196                 fibril_condvar_wait(&cconn->cstate_cv, &cconn->lock);
     196                fibril_condvar_wait(&cconn->cstate_cv, &cconn->lock);
    197197
    198198        PCUT_ASSERT_INT_EQUALS(st_established, cconn->cstate);
     
    203203        tcp_conn_lock(sconn);
    204204        while (sconn->cstate == st_listen || sconn->cstate == st_syn_received)
    205                 fibril_condvar_wait(&sconn->cstate_cv, &sconn->lock);
     205                fibril_condvar_wait(&sconn->cstate_cv, &sconn->lock);
    206206
    207207        PCUT_ASSERT_INT_EQUALS(st_established, sconn->cstate);
  • uspace/srv/net/tcp/test/rqueue.c

    r76d0981d r3bacee1  
    107107        seg_cnt = 0;
    108108
    109         inet_ep2_init(&epp);
     109        inet_ep2_init(&epp);
    110110
    111111        tcp_rqueue_fibril_start();
  • uspace/srv/net/tcp/test/seq_no.c

    r76d0981d r3bacee1  
    130130        conn->rcv_wnd = (uint32_t) -10;
    131131
    132         PCUT_ASSERT_FALSE(seq_no_in_rcv_wnd(conn,19));
     132        PCUT_ASSERT_FALSE(seq_no_in_rcv_wnd(conn, 19));
    133133        PCUT_ASSERT_TRUE(seq_no_in_rcv_wnd(conn, 20));
    134134        PCUT_ASSERT_TRUE(seq_no_in_rcv_wnd(conn, 21));
  • uspace/srv/net/udp/pdu.c

    r76d0981d r3bacee1  
    7272
    7373        for (i = 0; i < words; i++) {
    74                 w = ((uint16_t)bdata[2*i] << 8) | bdata[2*i + 1];
     74                w = ((uint16_t)bdata[2 * i] << 8) | bdata[2 * i + 1];
    7575                sum = udp_ocadd16(sum, w);
    7676        }
    7777
    7878        if (size % 2 != 0) {
    79                 w = ((uint16_t)bdata[2*words] << 8);
     79                w = ((uint16_t)bdata[2 * words] << 8);
    8080                sum = udp_ocadd16(sum, w);
    8181        }
  • uspace/srv/vfs/vfs_register.c

    r76d0981d r3bacee1  
    382382        fstypes->size = size;
    383383
    384         size = 0; count = 0;
     384        size = 0;
     385        count = 0;
    385386        list_foreach(fs_list, fs_link, fs_info_t, fs) {
    386387                l = str_size(fs->vfs_info.name) + 1;
Note: See TracChangeset for help on using the changeset viewer.