file: handle return output of b64_decode

Solve this compile warning:

file.c:300:16: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
                if (data_len < 0)

Signed-off-by: Luka Perkov <luka@openwrt.org>
This commit is contained in:
Luka Perkov 2016-04-12 10:56:21 +02:00 committed by Jo-Philipp Wich
parent c8c8f7d014
commit 2350c6fa91

2
file.c
View file

@ -271,7 +271,7 @@ rpc_file_write(struct ubus_context *ctx, struct ubus_object *obj,
mode_t prev_mode, mode = 0666; mode_t prev_mode, mode = 0666;
int fd, rv = 0; int fd, rv = 0;
void *data = NULL; void *data = NULL;
size_t data_len = 0; ssize_t data_len = 0;
blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb, blobmsg_parse(rpc_file_rw_policy, __RPC_F_RW_MAX, tb,
blob_data(msg), blob_len(msg)); blob_data(msg), blob_len(msg));