Changeset a35b458 in mainline for uspace/lib/http/src/http.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/http/src/http.c

    r3061bc1 ra35b458  
    6060        if (http == NULL)
    6161                return NULL;
    62        
     62
    6363        http->host = str_dup(host);
    6464        if (http->host == NULL) {
     
    6767        }
    6868        http->port = port;
    69        
     69
    7070        http->buffer_size = 4096;
    7171        errno_t rc = recv_buffer_init(&http->recv_buffer, http->buffer_size,
     
    7575                return NULL;
    7676        }
    77        
     77
    7878        return http;
    7979}
     
    8383        if (http->conn != NULL)
    8484                return EBUSY;
    85        
     85
    8686        errno_t rc = inet_host_plookup_one(http->host, ip_any, &http->addr, NULL,
    8787            NULL);
    8888        if (rc != EOK)
    8989                return rc;
    90        
     90
    9191        inet_ep2_t epp;
    92        
     92
    9393        inet_ep2_init(&epp);
    9494        epp.remote.addr = http->addr;
    9595        epp.remote.port = http->port;
    96        
     96
    9797        rc = tcp_create(&http->tcp);
    9898        if (rc != EOK)
    9999                return rc;
    100        
     100
    101101        rc = tcp_conn_create(http->tcp, &epp, NULL, NULL, &http->conn);
    102102        if (rc != EOK)
    103103                return rc;
    104        
     104
    105105        rc = tcp_conn_wait_connected(http->conn);
    106106        if (rc != EOK)
    107107                return rc;
    108        
     108
    109109        return rc;
    110110}
     
    114114        if (http->conn == NULL)
    115115                return EINVAL;
    116        
     116
    117117        tcp_conn_destroy(http->conn);
    118118        http->conn = NULL;
    119119        tcp_destroy(http->tcp);
    120120        http->tcp = NULL;
    121        
     121
    122122        return EOK;
    123123}
Note: See TracChangeset for help on using the changeset viewer.