]> xenbits.xensource.com Git - libvirt.git/commit
virStorageVol: avoid PATH_MAX-sized array
authorEric Blake <eblake@redhat.com>
Wed, 22 Jun 2011 19:51:32 +0000 (13:51 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 22 Jun 2011 23:13:58 +0000 (17:13 -0600)
commitaa286e537db10e1289c933d76845b94d8a51825b
tree79f2eedbba938384e350c3698a98badcd5abfab4
parent26dc216ae89a8ab7148d2a63789fb6a39bfe7b8d
virStorageVol: avoid PATH_MAX-sized array

POSIX allows implementations where PATH_MAX is undefined, leading
to compilation error.  Not to mention that even if it is defined,
it is often wasteful in relation to the amount of data being stored.

All clients of vol->key were audited, and found not to care about
whether key is static or dynamic, except for these offenders:

* src/datatypes.h (struct _virStorageVol): Manage key dynamically.
* src/datatypes.c (virReleaseStorageVol): Free key.
(virGetStorageVol): Copy key.
src/datatypes.c
src/datatypes.h