diff options
author | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2013-12-27 09:49:11 +0000 |
---|---|---|
committer | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2013-12-27 09:49:11 +0000 |
commit | b574145a6a5b1da8aca0fcf90350704b8eb52845 (patch) | |
tree | 61b31345e6d1374b05052267f9fe3e04b74435fb | |
parent | 702e28636b3144fa8a5e0a464f6675108589b8e7 (diff) | |
download | usrsctplib-b574145a6a5b1da8aca0fcf90350704b8eb52845.tar.gz |
Address some warnings.
git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8769 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-x | user_environment.c | 2 | ||||
-rwxr-xr-x | user_socket.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/user_environment.c b/user_environment.c index c540b61..6830a23 100755 --- a/user_environment.c +++ b/user_environment.c @@ -87,7 +87,7 @@ read_random_phony(void *buf, int count) /* Fill buf[] with random(9) output */ for (i = 0; i < count; i+= (int)sizeof(uint32_t)) { randval = random(); - size = MIN(count - i, sizeof(uint32_t)); + size = MIN(count - i, (int)sizeof(uint32_t)); memcpy(&((char *)buf)[i], &randval, (size_t)size); } diff --git a/user_socket.c b/user_socket.c index cbfb167..180f055 100755 --- a/user_socket.c +++ b/user_socket.c @@ -2772,6 +2772,8 @@ sctp_userspace_ip_output(int *result, struct mbuf *o_pak, ip = mtod(m, struct ip *); } udp = (struct udphdr *)(ip + 1); + } else { + udp = NULL; } if (!use_udp_tunneling) { @@ -2928,6 +2930,8 @@ void sctp_userspace_ip6_output(int *result, struct mbuf *o_pak, ip6 = mtod(m, struct ip6_hdr *); } udp = (struct udphdr *)(ip6 + 1); + } else { + udp = NULL; } if (!use_udp_tunneling) { |