Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/libcli/raw/raweas.c

    r414 r745  
    2727  reasonable assumption
    2828*/
    29 size_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
    30 {
    31         uint_t total = 4;
     29size_t ea_list_size(unsigned int num_eas, struct ea_struct *eas)
     30{
     31        unsigned int total = 4;
    3232        int i;
    3333        for (i=0;i<num_eas;i++) {
     
    4040  work out how many bytes on the wire a ea name list will consume.
    4141*/
    42 static uint_t ea_name_list_size(uint_t num_names, struct ea_name *eas)
    43 {
    44         uint_t total = 4;
     42static unsigned int ea_name_list_size(unsigned int num_names, struct ea_name *eas)
     43{
     44        unsigned int total = 4;
    4545        int i;
    4646        for (i=0;i<num_names;i++) {
     
    5555  reasonable assumption
    5656*/
    57 size_t ea_list_size_chained(uint_t num_eas, struct ea_struct *eas, unsigned alignment)
    58 {
    59         uint_t total = 0;
     57size_t ea_list_size_chained(unsigned int num_eas, struct ea_struct *eas, unsigned alignment)
     58{
     59        unsigned int total = 0;
    6060        int i;
    6161        for (i=0;i<num_eas;i++) {
    62                 uint_t len = 8 + strlen(eas[i].name.s)+1 + eas[i].value.length;
     62                unsigned int len = 8 + strlen(eas[i].name.s)+1 + eas[i].value.length;
    6363                len = (len + (alignment-1)) & ~(alignment-1);
    6464                total += len;
     
    7171  of size ea_list_size()
    7272*/
    73 void ea_put_list(uint8_t *data, uint_t num_eas, struct ea_struct *eas)
     73void ea_put_list(uint8_t *data, unsigned int num_eas, struct ea_struct *eas)
    7474{
    7575        int i;
     
    8282
    8383        for (i=0;i<num_eas;i++) {
    84                 uint_t nlen = strlen(eas[i].name.s);
     84                unsigned int nlen = strlen(eas[i].name.s);
    8585                SCVAL(data, 0, eas[i].flags);
    8686                SCVAL(data, 1, nlen);
     
    9797  at least of size ea_list_size()
    9898*/
    99 void ea_put_list_chained(uint8_t *data, uint_t num_eas, struct ea_struct *eas,
     99void ea_put_list_chained(uint8_t *data, unsigned int num_eas, struct ea_struct *eas,
    100100                         unsigned alignment)
    101101{
     
    103103
    104104        for (i=0;i<num_eas;i++) {
    105                 uint_t nlen = strlen(eas[i].name.s);
     105                unsigned int nlen = strlen(eas[i].name.s);
    106106                uint32_t len = 8+nlen+1+eas[i].value.length;
    107                 uint_t pad = ((len + (alignment-1)) & ~(alignment-1)) - len;
     107                unsigned int pad = ((len + (alignment-1)) & ~(alignment-1)) - len;
    108108                if (i == num_eas-1) {
    109109                        SIVAL(data, 0, 0);
     
    125125  pull a ea_struct from a buffer. Return the number of bytes consumed
    126126*/
    127 uint_t ea_pull_struct(const DATA_BLOB *blob,
     127unsigned int ea_pull_struct(const DATA_BLOB *blob,
    128128                      TALLOC_CTX *mem_ctx,
    129129                      struct ea_struct *ea)
     
    165165NTSTATUS ea_pull_list(const DATA_BLOB *blob,
    166166                      TALLOC_CTX *mem_ctx,
    167                       uint_t *num_eas, struct ea_struct **eas)
     167                      unsigned int *num_eas, struct ea_struct **eas)
    168168{
    169169        int n;
     
    185185
    186186        while (ofs < ea_size) {
    187                 uint_t len;
     187                unsigned int len;
    188188                DATA_BLOB blob2;
    189189
     
    214214NTSTATUS ea_pull_list_chained(const DATA_BLOB *blob,
    215215                              TALLOC_CTX *mem_ctx,
    216                               uint_t *num_eas, struct ea_struct **eas)
     216                              unsigned int *num_eas, struct ea_struct **eas)
    217217{
    218218        int n;
     
    229229
    230230        while (ofs < blob->length) {
    231                 uint_t len;
     231                unsigned int len;
    232232                DATA_BLOB blob2;
    233233                uint32_t next_ofs = IVAL(blob->data, ofs);
     
    262262  pull a ea_name from a buffer. Return the number of bytes consumed
    263263*/
    264 static uint_t ea_pull_name(const DATA_BLOB *blob,
     264static unsigned int ea_pull_name(const DATA_BLOB *blob,
    265265                           TALLOC_CTX *mem_ctx,
    266266                           struct ea_name *ea)
     
    290290NTSTATUS ea_pull_name_list(const DATA_BLOB *blob,
    291291                           TALLOC_CTX *mem_ctx,
    292                            uint_t *num_names, struct ea_name **ea_names)
     292                           unsigned int *num_names, struct ea_name **ea_names)
    293293{
    294294        int n;
     
    310310
    311311        while (ofs < ea_size) {
    312                 uint_t len;
     312                unsigned int len;
    313313                DATA_BLOB blob2;
    314314
     
    338338*/
    339339bool ea_push_name_list(TALLOC_CTX *mem_ctx,
    340                        DATA_BLOB *data, uint_t num_names, struct ea_name *eas)
     340                       DATA_BLOB *data, unsigned int num_names, struct ea_name *eas)
    341341{
    342342        int i;
     
    355355
    356356        for (i=0;i<num_names;i++) {
    357                 uint_t nlen = strlen(eas[i].name.s);
     357                unsigned int nlen = strlen(eas[i].name.s);
    358358                SCVAL(data->data, off, nlen);
    359359                memcpy(data->data+off+1, eas[i].name.s, nlen+1);
Note: See TracChangeset for help on using the changeset viewer.