Christoph Mallon: Simplify assignment.
authorSam Lantinga
Thu, 29 Aug 2013 08:26:24 -0700
changeset 7716be4cda94bce2
parent 7715 24f652e130fa
child 7717 0f48be750bba
Christoph Mallon: Simplify assignment.
src/SDL_hints.c
     1.1 --- a/src/SDL_hints.c	Thu Aug 29 08:25:54 2013 -0700
     1.2 +++ b/src/SDL_hints.c	Thu Aug 29 08:26:24 2013 -0700
     1.3 @@ -75,11 +75,7 @@
     1.4                  if (hint->value) {
     1.5                      SDL_free(hint->value);
     1.6                  }
     1.7 -                if (value) {
     1.8 -                    hint->value = SDL_strdup(value);
     1.9 -                } else {
    1.10 -                    hint->value = NULL;
    1.11 -                }
    1.12 +                hint->value = value ? SDL_strdup(value) : NULL;
    1.13              }
    1.14              hint->priority = priority;
    1.15              return SDL_TRUE;