openwrt / libubox

[MIRROR] C utility functions for OpenWrt

Home Page:https://git.openwrt.org/?p=project/libubox.git;

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question:blobmsg_add_u64()

zhao-wuji-ahh opened this issue · comments

commented

I want to know why the input parameters of the following functions are unsigned, why are they treated as signed?Could somebody help me?

blobmsg_add_u64(struct blob_buf *buf, const char *name, uint64_t val)
{
val = cpu_to_be64(val);
return blobmsg_add_field(buf, BLOBMSG_TYPE_INT64, name, &val, 8);
}

commented

why not create a new function to deal with signed parameters?