core/socket: shorten socket_fdname()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 19 Dec 2017 11:12:01 +0000 (20:12 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 23 Dec 2017 10:32:40 +0000 (19:32 +0900)
src/core/socket.c

index eb1c0bf..d2c4694 100644 (file)
@@ -3250,10 +3250,7 @@ char *socket_fdname(Socket *s) {
          * didn't specify anything specifically, use the socket unit's
          * name as fallback. */
 
-        if (s->fdname)
-                return s->fdname;
-
-        return UNIT(s)->id;
+        return s->fdname ?: UNIT(s)->id;
 }
 
 static int socket_control_pid(Unit *u) {