nr_open is already initialized by NR_OPEN_DEF. Removing unnecessary
checking and
assignment.
Signed-off-by: Salman Ahmed <salman0yam(a)gmail.com>
---
src/main.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/main.cpp b/src/main.cpp
index cf4e547..990bc1f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -293,8 +293,6 @@ static int get_nr_open(void) {
file.open("/proc/sys/fs/nr_open", ios::in);
if (file) {
file >> nr_open;
- if (!file)
- nr_open = NR_OPEN_DEF;
file.close();
}
return nr_open;
--
1.8.1.2
_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop
Hi Ahmed,
Did you use the tip of the tree to format/send your patch?
Your current patch is seeking to remove lines 293 an 294. You are off by
one line.
Thank you,
Alexandra.