Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 807766 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/expr.c (+3 lines)
Lines 279-288 int nftnl_expr_snprintf(char *buf, size_t remain, const struct nftnl_expr *expr, Link Here
279
	if (remain)
279
	if (remain)
280
		buf[0] = '\0';
280
		buf[0] = '\0';
281
281
282
	#pragma push_macro("snprintf")
283
	#undef snprintf
282
	if (!expr->ops->snprintf || type != NFTNL_OUTPUT_DEFAULT)
284
	if (!expr->ops->snprintf || type != NFTNL_OUTPUT_DEFAULT)
283
		return 0;
285
		return 0;
284
286
285
	ret = expr->ops->snprintf(buf + offset, remain, flags, expr);
287
	ret = expr->ops->snprintf(buf + offset, remain, flags, expr);
288
	#pragma pop_macro("snprintf")
286
	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
289
	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
287
290
288
	return offset;
291
	return offset;
(-)a/src/object.c (+3 lines)
Lines 396-402 static int nftnl_obj_snprintf_dflt(char *buf, size_t remain, Link Here
396
	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
396
	SNPRINTF_BUFFER_SIZE(ret, remain, offset);
397
397
398
	if (obj->ops) {
398
	if (obj->ops) {
399
		#pragma push_macro("snprintf")
400
		#undef snprintf
399
		ret = obj->ops->snprintf(buf + offset, remain, flags, obj);
401
		ret = obj->ops->snprintf(buf + offset, remain, flags, obj);
402
		#pragma pop_macro("snprintf")
400
		SNPRINTF_BUFFER_SIZE(ret, remain, offset);
403
		SNPRINTF_BUFFER_SIZE(ret, remain, offset);
401
	}
404
	}
402
	ret = snprintf(buf + offset, remain, "]");
405
	ret = snprintf(buf + offset, remain, "]");

Return to bug 807766