]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Merge branch 'sacplot' of git://github.com/dirkhh/subsurface
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Nov 2011 20:38:46 +0000 (18:38 -0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Nov 2011 20:38:46 +0000 (18:38 -0200)
* 'sacplot' of git://github.com/dirkhh/subsurface:
  Color pressure plot according to current SAC rate
  Fix minor coding standard issues introduced by my last commit

1  2 
divelist.c

diff --combined divelist.c
index 93ea34f6368a13735dc9c210cc2e1ef3c30b1b63,81779f06d25af2a4e10a05dfa62e953cdec0be7c..60ad16a7fe541ced018f03010e732957b6974024
@@@ -337,7 -337,7 +337,7 @@@ static int calculate_sac(struct dive *d
  
  void update_cylinder_related_info(struct dive *dive)
  {
-       if(dive != NULL) {
+       if (dive != NULL) {
                dive->sac = calculate_sac(dive);
                dive->otu = calculate_otu(dive);
        }
@@@ -351,8 -351,8 +351,8 @@@ static void get_string(char **str, cons
        if (!s)
                s = "";
        len = strlen(s);
 -      if (len > 40)
 -              len = 40;
 +      if (len > 60)
 +              len = 60;
        n = malloc(len+1);
        memcpy(n, s, len);
        n[len] = 0;
@@@ -457,8 -457,7 +457,8 @@@ static void fill_dive_list(void
  
        store = GTK_LIST_STORE(dive_list.model);
  
 -      for (i = 0; i < dive_table.nr; i++) {
 +      i = dive_table.nr;
 +      while (--i >= 0) {
                struct dive *dive = dive_table.dives[i];
  
                update_cylinder_related_info(dive);