]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
bugfixes
authorChristian Brauner <christian.brauner@mailbox.org>
Mon, 25 Apr 2016 11:42:45 +0000 (13:42 +0200)
committerChristian Brauner <christian.brauner@mailbox.org>
Mon, 25 Apr 2016 13:54:44 +0000 (15:54 +0200)
commita262ddb7e299a837a606a544bae494a18493de6d
tree9535364ca7686a9b8891dfc71623545eb11b22cd
parent3f441bc7bec47694a5159df4ddfc1d1093aa8dec
bugfixes

- Fix do_mount_cgroups(): It previously returned ret uninitialized on failure.
- Quite a few snprintf() call used size_t variables but then checked whether
  size_t < 0. Since size_t is unsigned these checks were always true. Let's use
  ssize_t instead which is signed.
- Use additional ssize_t variable to catch snprintf() error for swap
  calculation and add the value to the final result afterwards instead of
  directly.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
bindings.c
lxcfs.c