From 9e23d17869d595b93f2411eeca372bf0bee12de5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 29 Aug 2013 08:26:24 -0700 Subject: [PATCH] Christoph Mallon: Simplify assignment. --- src/SDL_hints.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/SDL_hints.c b/src/SDL_hints.c index b00e961cc9f85..63be87a116545 100644 --- a/src/SDL_hints.c +++ b/src/SDL_hints.c @@ -75,11 +75,7 @@ SDL_SetHintWithPriority(const char *name, const char *value, if (hint->value) { SDL_free(hint->value); } - if (value) { - hint->value = SDL_strdup(value); - } else { - hint->value = NULL; - } + hint->value = value ? SDL_strdup(value) : NULL; } hint->priority = priority; return SDL_TRUE;