diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2015-05-10 19:43:05 -0400 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2015-05-10 19:43:05 -0400 |
commit | 6c51f4f7b07fdefd5c69f6d7c96dc2f618f15189 (patch) | |
tree | 524c0a993e4273bdab59cb786526b62581dfb4db /src/gamma-drm.c | |
parent | Fix #174: Use nanosleep() instead of usleep() (diff) | |
parent | remove unnecessary null-checks, it is safe to pass NULL to free (per documentation) (diff) | |
download | redshift-ng-6c51f4f7b07fdefd5c69f6d7c96dc2f618f15189.tar.gz redshift-ng-6c51f4f7b07fdefd5c69f6d7c96dc2f618f15189.tar.bz2 redshift-ng-6c51f4f7b07fdefd5c69f6d7c96dc2f618f15189.tar.xz |
Merge pull request #214 from maandree/null-checks
Remove unnecessary null-checks
Diffstat (limited to 'src/gamma-drm.c')
-rw-r--r-- | src/gamma-drm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gamma-drm.c b/src/gamma-drm.c index d431395..d15f3f6 100644 --- a/src/gamma-drm.c +++ b/src/gamma-drm.c @@ -190,8 +190,7 @@ drm_free(drm_state_t *state) if (state->crtcs != NULL) { drm_crtc_state_t *crtcs = state->crtcs; while (crtcs->crtc_num >= 0) { - if (crtcs->r_gamma != NULL) - free(crtcs->r_gamma); + free(crtcs->r_gamma); crtcs->crtc_num = -1; crtcs++; } |