dangling-else.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff -ruNp old/stdlib/setenv.c new/stdlib/setenv.c
  2. --- old/stdlib/setenv.c
  3. +++ new/stdlib/setenv.c
  4. @@ -276,7 +276,7 @@ unsetenv (const char *name)
  5. LOCK;
  6. ep = __environ;
  7. - if (ep != NULL)
  8. + if (ep != NULL) {
  9. while (*ep != NULL)
  10. if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
  11. {
  12. @@ -288,8 +288,9 @@ unsetenv (const char *name)
  13. while (*dp++);
  14. /* Continue the loop in case NAME appears again. */
  15. }
  16. else
  17. ++ep;
  18. + }
  19. UNLOCK;
  20. diff -ruNp old/nis/nis_call.c new/nis/nis_call.c
  21. --- old/nis/nis_call.c
  22. +++ new/nis/nis_call.c
  23. @@ -679,7 +679,7 @@ nis_server_cache_add (const_nis_name nam
  24. /* Choose which entry should be evicted from the cache. */
  25. loc = &nis_server_cache[0];
  26. - if (*loc != NULL)
  27. + if (*loc != NULL) {
  28. for (i = 1; i < 16; ++i)
  29. if (nis_server_cache[i] == NULL)
  30. {
  31. @@ -690,6 +690,7 @@ nis_server_cache_add (const_nis_name nam
  32. || ((*loc)->uses == nis_server_cache[i]->uses
  33. && (*loc)->expires > nis_server_cache[i]->expires))
  34. loc = &nis_server_cache[i];
  35. + }
  36. old = *loc;
  37. *loc = new;