summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-01-16 05:56:45 (GMT)
committerThomas Haller <thaller@redhat.com>2018-01-16 06:07:44 (GMT)
commitcff8b15cc103c8293ea492c11f101ef414858a8e (patch)
tree94995225ea83291745f3261566111dfce7962b90
parentb590366ffbc759505dabe438bea18ce0c3bce515 (diff)
downloadlibnl-cff8b15cc103c8293ea492c11f101ef414858a8e.zip
libnl-cff8b15cc103c8293ea492c11f101ef414858a8e.tar.gz
libnl-cff8b15cc103c8293ea492c11f101ef414858a8e.tar.bz2
route: add rtnl_netem_set_delay_distribution_data() to linker script
And some style fixes.
-rw-r--r--lib/route/qdisc/netem.c8
-rw-r--r--libnl-route-3.sym5
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c
index 0df5b01..18473e9 100644
--- a/lib/route/qdisc/netem.c
+++ b/lib/route/qdisc/netem.c
@@ -904,6 +904,8 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist
char *line;
char name[NAME_MAX];
char dist_suffix[] = ".dist";
+ int16_t *data;
+ char *test_suffix;
/* Check several locations for the dist file */
char *test_path[] = {
@@ -915,7 +917,7 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist
};
/* If the given filename already ends in .dist, don't append it later */
- char *test_suffix = strstr(dist_type, dist_suffix);
+ test_suffix = strstr(dist_type, dist_suffix);
if (test_suffix != NULL && strlen(test_suffix) == 5)
strcpy(dist_suffix, "");
@@ -928,7 +930,7 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist
if (f == NULL)
return -nl_syserr2nlerr(errno);
- int16_t * data = (int16_t *) calloc (MAXDIST, sizeof(int16_t));
+ data = (int16_t *) calloc (MAXDIST, sizeof(int16_t));
line = (char *) calloc (sizeof(char), len + 1);
@@ -953,7 +955,7 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist
free(line);
fclose(f);
-
+
return rtnl_netem_set_delay_distribution_data(qdisc, data, n);
}
diff --git a/libnl-route-3.sym b/libnl-route-3.sym
index e66682a..3cee113 100644
--- a/libnl-route-3.sym
+++ b/libnl-route-3.sym
@@ -1061,3 +1061,8 @@ global:
rtnl_route_get_ttl_propagate;
rtnl_route_nh_encap_mpls;
} libnl_3_2_29;
+
+libnl_3_5 {
+global:
+ rtnl_netem_set_delay_distribution_data;
+} libnl_3_4;