Commit 9e23d17869d595b93f2411eeca372bf0bee12de5

Sam Lantinga 2013-08-29T08:26:24

Christoph Mallon: Simplify assignment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/SDL_hints.c b/src/SDL_hints.c
index b00e961..63be87a 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;