mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
custom if statement reordering
It makes more sense to return before hitting else. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
+2
-4
@@ -317,11 +317,9 @@ int main(int argc, char **argv)
|
||||
while (1) {
|
||||
sa = accept(sl,(struct sockaddr *)&clientaddr, &sin_size);
|
||||
if (sa > 0 ){
|
||||
|
||||
if (fork())
|
||||
close(sa);
|
||||
else
|
||||
if (!fork())
|
||||
break;
|
||||
close(sa);
|
||||
}
|
||||
else {
|
||||
if (errno != EINTR) {
|
||||
|
||||
Reference in New Issue
Block a user