aboutsummaryrefslogtreecommitdiffstats
path: root/src/p2p/p2p_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/p2p/p2p_utils.c')
-rw-r--r--src/p2p/p2p_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/p2p_utils.c b/src/p2p/p2p_utils.c
index c0da312..f32751d 100644
--- a/src/p2p/p2p_utils.c
+++ b/src/p2p/p2p_utils.c
@@ -390,7 +390,7 @@ void p2p_channels_dump(struct p2p_data *p2p, const char *title,
const struct p2p_reg_class *c;
c = &chan->reg_class[i];
ret = os_snprintf(pos, end - pos, " %u:", c->reg_class);
- if (ret < 0 || ret >= end - pos)
+ if (os_snprintf_error(end - pos, ret))
break;
pos += ret;
@@ -398,7 +398,7 @@ void p2p_channels_dump(struct p2p_data *p2p, const char *title,
ret = os_snprintf(pos, end - pos, "%s%u",
j == 0 ? "" : ",",
c->channel[j]);
- if (ret < 0 || ret >= end - pos)
+ if (os_snprintf_error(end - pos, ret))
break;
pos += ret;
}