summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7c5d2b3)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
static void blobmsg_format_string(struct strbuf *s, const char *str)
{
static void blobmsg_format_string(struct strbuf *s, const char *str)
{
- const char *p, *last = str, *end = str + strlen(str);
+ const unsigned char *p, *last, *end;
+ end = (unsigned char *) str + strlen(str);
blobmsg_puts(s, "\"", 1);
blobmsg_puts(s, "\"", 1);
- for (p = str; *p; p++) {
+ for (p = (unsigned char *) str, last = p; *p; p++) {
char escape = '\0';
int len;
char escape = '\0';
int len;
- blobmsg_puts(s, last, p - last);
+ blobmsg_puts(s, (char *) last, p - last);
last = p + 1;
buf[1] = escape;
last = p + 1;
buf[1] = escape;
blobmsg_puts(s, buf, len);
}
blobmsg_puts(s, buf, len);
}
- blobmsg_puts(s, last, end - last);
+ blobmsg_puts(s, (char *) last, end - last);
blobmsg_puts(s, "\"", 1);
}
blobmsg_puts(s, "\"", 1);
}