Skip to content
Commit e0a20857 authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Minor tidyup in load_proc_partitions_info_cache()

Minor issues:
1) In the while loop reading from /proc/partitions into variable line,
   just after the sscanf() call the variable was re-purposed to hold the
   device name making the code unnecessarily hard to follow.
2) Variable c_str was a fixed sized buffer holding the device name read
   from /proc/partitions.
3) Variable c_str name provides no meaning as to what data it holds.
4) Return value from all the Utils::regexp_label() calls is converted
   from Glib::ustring to std::string to be stored in device variable.

Resolve by using Utils::regexp_label() to extract the device name from
each line in /proc/partitions and store in the variable device, already
used for this purpose and now changed to type Glib::ustring.
parent d04826cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment