aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-05-23 15:48:44 -0700
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-05-23 15:48:44 -0700
commitfd9a471c9d99c1a59ee0baaa65a27dfc46ccb8fd (patch)
treeccbdb594c705470a4462fc8cea539a5b2d1fcdcb
parent35292269e1dae9d34e86f69f84c87837e38b1225 (diff)
downloadcrda-fd9a471c9d99c1a59ee0baaa65a27dfc46ccb8fd.tar.gz
crda: remove verbose errors out of regdom_intersect()
We want to move this to reglib so nuke all that fluff. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--intersect.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/intersect.c b/intersect.c
index e35f2cc..bd2976f 100644
--- a/intersect.c
+++ b/intersect.c
@@ -110,10 +110,8 @@ static struct ieee80211_regdomain *regdom_intersect(
memset(intersected_rule, 0, sizeof(struct ieee80211_reg_rule));
- if (!rd1 || !rd2) {
- fprintf(stderr, "rd1 or or rd2 is null\n");
+ if (!rd1 || !rd2)
return NULL;
- }
/* First we get a count of the rules we'll need, then we actually
* build them. This is to so we can malloc() and free() a
@@ -133,19 +131,15 @@ static struct ieee80211_regdomain *regdom_intersect(
}
}
- if (!num_rules) {
- fprintf(stderr, "error: num_rules == 0\n");
+ if (!num_rules)
return NULL;
- }
size_of_regd = sizeof(struct ieee80211_regdomain) +
((num_rules + 1) * sizeof(struct ieee80211_reg_rule));
rd = malloc(size_of_regd);
- if (!rd) {
- fprintf(stderr, "no memory left\n");
+ if (!rd)
return NULL;
- }
memset(rd, 0, size_of_regd);
@@ -166,7 +160,6 @@ static struct ieee80211_regdomain *regdom_intersect(
}
if (rule_idx != num_rules) {
- fprintf(stderr, "Error while doing regdom interesection :(\n");
free(rd);
return NULL;
}