Skip to content

Commit cf41af4

Browse files
committed
i3: drop cache string
1 parent b2e2660 commit cf41af4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

desktopsupport/i3.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,12 @@ void i3DesktopSupport::removeFullscreen(QWidget& w) const {
7676

7777

7878
const string i3DesktopSupport::getSocketpath() {
79-
/** Cache for the socket path */
80-
static string spath;
81-
if ( ! spath.empty() ) {
82-
return spath;
83-
}
84-
8579
/** FIXME: Actually check the return STRING, not just the retval */
8680
int ret = system("i3 --get-socketpath");
8781

8882
if ( ret == 0 ) {
89-
spath = "OK";
83+
return "OK";
9084
}
9185

92-
return spath;
86+
return string();
9387
}

0 commit comments

Comments
 (0)