drm: remove unnecessary NULL checks, and fix some indents..

main
Jakob Bornecrantz 2007-02-25 10:48:26 +11:00 committed by Dave Airlie
parent 2b7a9afa09
commit 9d8ba2d0d4
2 changed files with 13 additions and 13 deletions

View File

@ -585,9 +585,9 @@ int drmOpen(const char *name, const char *busid)
void drmFreeVersion(drmVersionPtr v) void drmFreeVersion(drmVersionPtr v)
{ {
if (!v) return; if (!v) return;
if (v->name) drmFree(v->name); drmFree(v->name);
if (v->date) drmFree(v->date); drmFree(v->date);
if (v->desc) drmFree(v->desc); drmFree(v->desc);
drmFree(v); drmFree(v);
} }
@ -604,9 +604,9 @@ void drmFreeVersion(drmVersionPtr v)
static void drmFreeKernelVersion(drm_version_t *v) static void drmFreeKernelVersion(drm_version_t *v)
{ {
if (!v) return; if (!v) return;
if (v->name) drmFree(v->name); drmFree(v->name);
if (v->date) drmFree(v->date); drmFree(v->date);
if (v->desc) drmFree(v->desc); drmFree(v->desc);
drmFree(v); drmFree(v);
} }

View File

@ -678,7 +678,7 @@ typedef struct drm_set_version {
typedef struct drm_fence_arg { typedef struct drm_fence_arg {
unsigned handle; unsigned handle;
int class; int class;
unsigned type; unsigned type;
unsigned flags; unsigned flags;
unsigned signaled; unsigned signaled;
@ -807,7 +807,7 @@ typedef struct drm_bo_arg_request {
drm_bo_type_t type; drm_bo_type_t type;
unsigned arg_handle; unsigned arg_handle;
drm_u64_t buffer_start; drm_u64_t buffer_start;
unsigned page_alignment; unsigned page_alignment;
unsigned expand_pad[4]; /*Future expansion */ unsigned expand_pad[4]; /*Future expansion */
enum { enum {
drm_bo_create, drm_bo_create,
@ -838,11 +838,11 @@ typedef struct drm_bo_arg_reply {
drm_u64_t size; drm_u64_t size;
drm_u64_t offset; drm_u64_t offset;
drm_u64_t arg_handle; drm_u64_t arg_handle;
unsigned mask; unsigned mask;
drm_u64_t buffer_start; drm_u64_t buffer_start;
unsigned fence_flags; unsigned fence_flags;
unsigned rep_flags; unsigned rep_flags;
unsigned page_alignment; unsigned page_alignment;
unsigned expand_pad[4]; /*Future expansion */ unsigned expand_pad[4]; /*Future expansion */
}drm_bo_arg_reply_t; }drm_bo_arg_reply_t;