]> code.delx.au - pulseaudio/commitdiff
shm: Use a goto rather than early return for consistency.
authorMaarten Bosmans <mkbosmans@gmail.com>
Sun, 27 Nov 2011 16:12:10 +0000 (16:12 +0000)
committerColin Guthrie <colin@mageia.org>
Sun, 27 Nov 2011 16:25:04 +0000 (16:25 +0000)
This is functionally the same but is easier to understand.

src/pulsecore/shm.c

index 06e32c4b60184ad31a468e15e0c60613bbd51776..fe34a51feb9f35a7c2fadb34c221a31abbad1cdf 100644 (file)
@@ -176,7 +176,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
         pa_assert_se(pa_close(fd) == 0);
         m->do_unlink = TRUE;
 #else
-        return -1;
+        goto fail;
 #endif
     }