Changeset 7869e48 for libfaim/bstream.c


Ignore:
Timestamp:
Jan 12, 2013, 1:43:13 PM (12 years ago)
Author:
Jason Gross <jgross@mit.edu>
Children:
e3a0d71, 4485285
Parents:
4626016
git-author:
Jason Gross <jgross@mit.edu> (01/12/13 13:13:18)
git-committer:
Jason Gross <jgross@mit.edu> (01/12/13 13:43:13)
Message:
Remove trailing whitespace

This commit was made with the command sequence

    for i in $(git ls-files | tr '\n' ' ');
    do
      echo $i; sed -i s'/\s\+$//g' "$(readlink -f $i)";
    done
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfaim/bstream.c

    re374dee r7869e48  
    66
    77#define FAIM_INTERNAL
    8 #include <aim.h> 
     8#include <aim.h>
    99
    1010faim_internal int aim_bstream_init(aim_bstream_t *bs, fu8_t *data, int len)
    1111{
    12        
     12
    1313        if (!bs)
    1414                return -1;
     
    6363faim_internal fu8_t aimbs_get8(aim_bstream_t *bs)
    6464{
    65        
    66         if (aim_bstream_empty(bs) < 1)
    67                 return 0; /* XXX throw an exception */
    68        
     65
     66        if (aim_bstream_empty(bs) < 1)
     67                return 0; /* XXX throw an exception */
     68
    6969        bs->offset++;
    70        
     70
    7171        return aimutil_get8(bs->data + bs->offset - 1);
    7272}
     
    7474faim_internal fu16_t aimbs_get16(aim_bstream_t *bs)
    7575{
    76        
    77         if (aim_bstream_empty(bs) < 2)
    78                 return 0; /* XXX throw an exception */
    79        
     76
     77        if (aim_bstream_empty(bs) < 2)
     78                return 0; /* XXX throw an exception */
     79
    8080        bs->offset += 2;
    81        
     81
    8282        return aimutil_get16(bs->data + bs->offset - 2);
    8383}
     
    8585faim_internal fu32_t aimbs_get32(aim_bstream_t *bs)
    8686{
    87        
    88         if (aim_bstream_empty(bs) < 4)
    89                 return 0; /* XXX throw an exception */
    90        
     87
     88        if (aim_bstream_empty(bs) < 4)
     89                return 0; /* XXX throw an exception */
     90
    9191        bs->offset += 4;
    92        
     92
    9393        return aimutil_get32(bs->data + bs->offset - 4);
    9494}
     
    9696faim_internal fu8_t aimbs_getle8(aim_bstream_t *bs)
    9797{
    98        
    99         if (aim_bstream_empty(bs) < 1)
    100                 return 0; /* XXX throw an exception */
    101        
     98
     99        if (aim_bstream_empty(bs) < 1)
     100                return 0; /* XXX throw an exception */
     101
    102102        bs->offset++;
    103        
     103
    104104        return aimutil_getle8(bs->data + bs->offset - 1);
    105105}
     
    107107faim_internal fu16_t aimbs_getle16(aim_bstream_t *bs)
    108108{
    109        
    110         if (aim_bstream_empty(bs) < 2)
    111                 return 0; /* XXX throw an exception */
    112        
     109
     110        if (aim_bstream_empty(bs) < 2)
     111                return 0; /* XXX throw an exception */
     112
    113113        bs->offset += 2;
    114        
     114
    115115        return aimutil_getle16(bs->data + bs->offset - 2);
    116116}
     
    118118faim_internal fu32_t aimbs_getle32(aim_bstream_t *bs)
    119119{
    120        
    121         if (aim_bstream_empty(bs) < 4)
    122                 return 0; /* XXX throw an exception */
    123        
     120
     121        if (aim_bstream_empty(bs) < 4)
     122                return 0; /* XXX throw an exception */
     123
    124124        bs->offset += 4;
    125        
     125
    126126        return aimutil_getle32(bs->data + bs->offset - 4);
    127127}
Note: See TracChangeset for help on using the changeset viewer.