Skip to content

Commit 6fbc82c

Browse files
Łukasz Stelmachbluca
authored andcommitted
Remove sysfd
sysfd isn't used anymore in svg_title() and has never been since moving into main() as a local variable. Let's remove it. Follow-up-for: f91781329c6d8a760e3c1b88b66b0e2137c2e5ab@systemd
1 parent fb23645 commit 6fbc82c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/bootchart.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,6 @@ int main(int argc, char *argv[]) {
315315
_cleanup_closedir_ DIR *proc = NULL;
316316
_cleanup_free_ char *build = NULL;
317317
_cleanup_fclose_ FILE *of = NULL;
318-
_cleanup_close_ int sysfd = -1;
319318
int schfd;
320319
struct ps_struct *ps_first;
321320
double graph_start;
@@ -415,9 +414,6 @@ int main(int argc, char *argv[]) {
415414
sampledata->sampletime = gettime_ns();
416415
sampledata->counter = samples;
417416

418-
if (sysfd < 0)
419-
sysfd = open("/sys", O_RDONLY|O_CLOEXEC);
420-
421417
if (!build) {
422418
if (parse_env_file("/etc/os-release", NEWLINE, "PRETTY_NAME", &build, NULL) == -ENOENT)
423419
parse_env_file("/usr/lib/os-release", NEWLINE, "PRETTY_NAME", &build, NULL);

0 commit comments

Comments
 (0)