diff options
author | Ben Pfaff <blp@nicira.com> | 2011-02-23 11:29:37 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-02-23 15:14:42 -0800 |
commit | c55acc2eed76ae17667fa5f65f5f3c347b796926 (patch) | |
tree | 14d8d5c4a8dcd2679cc761812654a1d398c8bdb7 /lib/stream.h | |
parent | fe81a2987abeda195f6535cab973b1c753cca4b3 (diff) |
stream: Make stream_report_content() tolerate negative size.
A negative size probably means that a system call failed. The caller could
set that to 0 but we might as well just tolerate it in
stream_report_content() by making the parameter type signed.
Coverity #10718.
Diffstat (limited to 'lib/stream.h')
-rw-r--r-- | lib/stream.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/stream.h b/lib/stream.h index 2482bf20..51a76566 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ #include <stdbool.h> #include <stddef.h> #include <stdint.h> +#include <sys/types.h> #include "openvswitch/types.h" #include "vlog.h" @@ -84,7 +85,7 @@ enum stream_content_type { STREAM_JSONRPC }; -void stream_report_content(const void *, size_t, enum stream_content_type, +void stream_report_content(const void *, ssize_t, enum stream_content_type, struct vlog_module *, const char *stream_name); #endif /* stream.h */ |