Skip to content

Commit fcd02a7

Browse files
author
git-core
committed
Declare deny/allow as noreturn
1 parent 2ceab21 commit fcd02a7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

su.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void usage(int status)
300300
exit(status);
301301
}
302302

303-
static void deny(const struct su_context *ctx)
303+
static __attribute__ ((noreturn)) void deny(const struct su_context *ctx)
304304
{
305305
char *cmd = get_command(&ctx->to);
306306

@@ -310,7 +310,7 @@ static void deny(const struct su_context *ctx)
310310
exit(EXIT_FAILURE);
311311
}
312312

313-
static void allow(const struct su_context *ctx)
313+
static __attribute__ ((noreturn)) void allow(const struct su_context *ctx)
314314
{
315315
char *arg0;
316316
int argc, err;
@@ -611,7 +611,4 @@ int main(int argc, char *argv[])
611611
LOGE("unknown response from Superuser Requestor: %s", result);
612612
deny(&ctx);
613613
}
614-
615-
deny(&ctx);
616-
return -1;
617614
}

0 commit comments

Comments
 (0)