---
 src/lib/dist.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/dist.c b/src/lib/dist.c
index bde94ab..2b7fdf3 100644
--- a/src/lib/dist.c
+++ b/src/lib/dist.c
@@ -205,13 +205,7 @@ int read_dist_actions(char *dist_name, char *dir, 
dist_actions *actions)
  */
 char *get_dist_name(tmpl_param *tmpl)
 {
-       const char *p = NULL;
+       const char *p = tmpl->dist ? tmpl->dist : tmpl->ostmpl;
 
-       if (tmpl->dist != NULL)
-               p = tmpl->dist;
-       else if (tmpl->ostmpl != NULL)
-               p = tmpl->ostmpl;
-       if (p != NULL)
-               return strdup(p);
-       return NULL;
+       return p ? strdup(p) : NULL;
 }
-- 
1.7.9.5

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to