Keeping up the fight for whitespace consistency

Sadly, some of the code being fixed is my own...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-10-11 07:25:52 -04:00
parent 46bb02e8fc
commit 43765d2897
2 changed files with 47 additions and 44 deletions

13
dive.c
View file

@ -341,15 +341,18 @@ static void copy_tl(struct tag_entry *st, struct tag_entry *dt)
/* Clear everything but the first element; /* Clear everything but the first element;
* this works for taglist, picturelist, even dive computers */ * this works for taglist, picturelist, even dive computers */
#define STRUCTURED_LIST_FREE(_type, _start, _free) {\ #define STRUCTURED_LIST_FREE(_type, _start, _free) \
{ \
_type *_ptr = _start; \ _type *_ptr = _start; \
while (_ptr) { \ while (_ptr) { \
_type *_next = _ptr->next; \ _type *_next = _ptr->next; \
_free(_ptr); \ _free(_ptr); \
_ptr = _next; \ _ptr = _next; \
}} } \
}
#define STRUCTURED_LIST_COPY(_type, _first, _dest, _cpy) {\ #define STRUCTURED_LIST_COPY(_type, _first, _dest, _cpy) \
{ \
_type *_sptr = _first; \ _type *_sptr = _first; \
_type **_dptr = &_dest; \ _type **_dptr = &_dest; \
while (_sptr) { \ while (_sptr) { \
@ -1500,7 +1503,6 @@ extern void fill_pressures(struct gas_pressures *pressures, const double amb_pre
pressures->he = get_he(mix) / 1000.0 * amb_pressure; pressures->he = get_he(mix) / 1000.0 * amb_pressure;
pressures->n2 = (1000 - get_o2(mix) - get_he(mix)) / 1000.0 * amb_pressure; pressures->n2 = (1000 - get_o2(mix) - get_he(mix)) / 1000.0 * amb_pressure;
} }
} }
static int find_cylinder_match(cylinder_t *cyl, cylinder_t array[], unsigned int used) static int find_cylinder_match(cylinder_t *cyl, cylinder_t array[], unsigned int used)
@ -2612,7 +2614,8 @@ void dive_set_geodata_from_picture(struct dive *d, struct picture *pic)
} }
} }
static void picture_free( struct picture *p){ static void picture_free(struct picture *p)
{
if (!p) if (!p)
return; return;
free(p->filename); free(p->filename);