diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-03-11 11:28:15 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2014-03-12 08:50:05 +0100 |
commit | 92ff79f1a804d63d2f2bb59dfbf3a2869627609a (patch) | |
tree | 8b56ea3b223e4bfcc20c4f611c73a18d8d73aac4 /include | |
parent | e7b84ca46944895971a8f048c7e34869b7de01c0 (diff) |
config_odev*: Use XNF alloc functions
config_odev* functions are called in code-paths were we already use
XNF* functions in other places, so which are not oom safe already.
Besides that oom is something which should simply never happen, so aborting
when it does is as good a response as any other.
While switching to XNF functions also fixup an unchecked strdup case.
Note the function prototypes are kept unchanged, as they are part of the
server ABI.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/hotplug.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hotplug.h b/include/hotplug.h index 1d9364eee..cefc164ae 100644 --- a/include/hotplug.h +++ b/include/hotplug.h @@ -48,12 +48,14 @@ struct OdevAttributes { struct xorg_list list; }; +/* Note starting with xserver 1.16 this function never fails */ struct OdevAttributes * config_odev_allocate_attribute_list(void); void config_odev_free_attribute_list(struct OdevAttributes *attribs); +/* Note starting with xserver 1.16 this function never fails */ Bool config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, const char *attrib_name); @@ -61,6 +63,7 @@ config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, char * config_odev_get_attribute(struct OdevAttributes *attribs, int attrib_id); +/* Note starting with xserver 1.16 this function never fails */ Bool config_odev_add_int_attribute(struct OdevAttributes *attribs, int attrib, int attrib_value); |