[lxc-devel] [PATCH] coverity: ftell returns a signed value
Serge Hallyn
serge.hallyn at ubuntu.com
Fri May 3 18:04:02 UTC 2013
Quoting Dwight Engen (dwight.engen at oracle.com):
> The check for flen < 0 could never have been true since flen was declared
> to be size_t (unsigned). Declare flen to be long since that is what ftell
> returns.
>
> Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
thanks, applied
> ---
> src/lxc/lxccontainer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> index 73c347d..04a9208 100644
> --- a/src/lxc/lxccontainer.c
> +++ b/src/lxc/lxccontainer.c
> @@ -1133,7 +1133,7 @@ static int update_name_and_paths(const char *path, struct lxc_container *oldc,
> const char *newname, const char *newpath)
> {
> FILE *f;
> - size_t flen;
> + long flen;
> char *contents;
> const char *p0, *p1, *p2, *end;
> const char *oldpath = oldc->get_config_path(oldc);
> --
> 1.8.1.4
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel
More information about the lxc-devel
mailing list