aboutsummaryrefslogtreecommitdiff
path: root/liblogdiag
diff options
context:
space:
mode:
Diffstat (limited to 'liblogdiag')
-rw-r--r--liblogdiag/ld-diagram-view.c2
-rw-r--r--liblogdiag/ld-lua.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c
index 3ff7599..5905388 100644
--- a/liblogdiag/ld-diagram-view.c
+++ b/liblogdiag/ld-diagram-view.c
@@ -1315,7 +1315,7 @@ point_to_line_segment_distance
/* The projection is beyond the line segment. */
if (u < 0.)
return ld_point_distance (point, p1->x, p1->y);
- else if (u > 1.)
+ if (u > 1.)
return ld_point_distance (point, p2->x, p2->y);
/* The projection is on the line segment. */
diff --git a/liblogdiag/ld-lua.c b/liblogdiag/ld-lua.c
index 32c641b..4998320 100644
--- a/liblogdiag/ld-lua.c
+++ b/liblogdiag/ld-lua.c
@@ -250,8 +250,7 @@ ld_lua_alloc (void *ud, void *ptr, size_t osize, size_t nsize)
g_free (ptr);
return NULL;
}
- else
- return g_try_realloc (ptr, nsize);
+ return g_try_realloc (ptr, nsize);
}
/**