]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Avoid using type 'gasmix_t': use 'struct gasmix' instead
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Sep 2011 16:47:55 +0000 (09:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Sep 2011 16:47:55 +0000 (09:47 -0700)
libdivecomputer already uses 'gasmix_t' for its own gasmix thing.  I
don't like th eway we step on each others name spaces, but hey, might as
well just use 'struct gasmix' and avoid the typedef.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
dive.c
dive.h
parse-xml.c

diff --git a/dive.c b/dive.c
index ba5200f51af744c90dc3e86595c6c320e3956288..e899c6ccbab5d26cff741f7040da86fd45d96b04 100644 (file)
--- a/dive.c
+++ b/dive.c
@@ -246,7 +246,7 @@ static void merge_cylinder_type(cylinder_type_t *res, cylinder_type_t *a, cylind
        *res = *b;
 }
 
-static void merge_cylinder_mix(gasmix_t *res, gasmix_t *a, gasmix_t *b)
+static void merge_cylinder_mix(struct gasmix *res, struct gasmix *a, struct gasmix *b)
 {
        if (a->o2.permille)
                b = a;
diff --git a/dive.h b/dive.h
index 9e5d2c49e4ab7a1db5fe9cc887887c2e8a703ed4..d96e0102d443fd91f5b62c8348d9f2cb70ed20af 100644 (file)
--- a/dive.h
+++ b/dive.h
@@ -69,10 +69,10 @@ typedef struct {
        int grams;
 } weight_t;
 
-typedef struct {
+struct gasmix {
        fraction_t o2;
        fraction_t he;
-} gasmix_t;
+};
 
 typedef struct {
        volume_t size;
@@ -82,7 +82,7 @@ typedef struct {
 
 typedef struct {
        cylinder_type_t type;
-       gasmix_t gasmix;
+       struct gasmix gasmix;
        pressure_t start, end;
 } cylinder_t;
 
index e14d9db2b74ed0e7ac94ba9f2e6f30807d7d22ac..d17f7a8eed4d77ed0f8e862bb73b754dff0a4726 100644 (file)
@@ -998,7 +998,7 @@ static void dive_start(void)
        memset(&tm, 0, sizeof(tm));
 }
 
-static void sanitize_gasmix(gasmix_t *mix)
+static void sanitize_gasmix(struct gasmix *mix)
 {
        unsigned int o2, he;