Преглед на файлове

remove useless infinite loop from end of exit function

this was originally added as a cheap but portable way to quell
warnings about reaching the end of a function that does not return,
but since _Exit is marked _Noreturn, it's not needed. removing it
makes the call to _Exit into a tail call and shaves off a few bytes of
code from minimal static programs.
Rich Felker преди 10 години
родител
ревизия
5cc1872156
променени са 1 файла, в които са добавени 0 реда и са изтрити 1 реда
  1. 0 1
      src/exit/exit.c

+ 0 - 1
src/exit/exit.c

@@ -31,5 +31,4 @@ _Noreturn void exit(int code)
 	__stdio_exit();
 
 	_Exit(code);
-	for(;;);
 }