diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-06-08 13:21:51 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-06-08 13:21:51 (GMT) |
commit | d8a25e4c5cf6a091094ce239c81626410f460266 (patch) | |
tree | b72bcd52da9a8303b0485baa43ce0be4b4bbfa2c /lib/route/qdisc/netem.c | |
parent | d3dcde2585cd26642aa236ed94442c838b8b7471 (diff) | |
download | libnl-d8a25e4c5cf6a091094ce239c81626410f460266.zip libnl-d8a25e4c5cf6a091094ce239c81626410f460266.tar.gz libnl-d8a25e4c5cf6a091094ce239c81626410f460266.tar.bz2 |
netem: Use ARRAY_SIZE()
Diffstat (limited to 'lib/route/qdisc/netem.c')
-rw-r--r-- | lib/route/qdisc/netem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c index 5f26096..3e5ba52 100644 --- a/lib/route/qdisc/netem.c +++ b/lib/route/qdisc/netem.c @@ -841,7 +841,7 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist /* Check several locations for the dist file */ char *test_path[] = { "", "./", "/usr/lib/tc/", "/usr/local/lib/tc/" }; - for (i = 0; i < sizeof(test_path)/sizeof(test_path[0]); i++) { + for (i = 0; i < ARRAY_SIZE(test_path); i++) { snprintf(name, NAME_MAX, "%s%s%s", test_path[i], dist_type, dist_suffix); if ((f = fopen(name, "r"))) break; |