summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-06 13:59:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-06 13:59:14 -0700
commitb1538c809d0ce5abe489822f9d2b21287a0a38d5 (patch)
tree303fbcb44fbd14d0039293cdc7e9a34e8b2424ba /planner.c
parente76675d4df466448a33532895dd371aa498a0e49 (diff)
downloadsubsurface-b1538c809d0ce5abe489822f9d2b21287a0a38d5.tar.gz
Code cleanup
Make precedence of && over || explicit. Explicitly convert between char * and unsigned char *. Don't assign potentially negative return code to an unsigend variable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/planner.c b/planner.c
index b04c835ef..8569fc904 100644
--- a/planner.c
+++ b/planner.c
@@ -624,8 +624,9 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
}
}
} else {
- if (plan_display_transitions || dp->entered || !dp->next || (nextdp && dp->depth != nextdp->depth) ||
- !isascent && gaschange_before && ((nextdp && dp->depth != nextdp->depth) || gaschange_after) ||
+ if (plan_display_transitions || dp->entered || !dp->next ||
+ (nextdp && dp->depth != nextdp->depth) ||
+ (!isascent && gaschange_before && nextdp && dp->depth != nextdp->depth) || gaschange_after ||
(isascent && gaschange_after && nextdp && dp->depth != nextdp->depth )) {
snprintf(temp, sizeof(temp), translate("gettextFromC", "%3.0f%s"), depthvalue, depth_unit);
len += snprintf(buffer + len, sizeof(buffer) - len, "<tr><td style='padding-left: 10px; float: right;'>%s</td>", temp);