summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authordemostanis <demostanis@protonmail.com>2022-10-22 15:38:21 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-24 23:29:18 +0100
commit3e8b5ac92012e19847e536a20a3f0ec7e5c787d3 (patch)
tree58294f8f5e5eeaa63231876148da783ca81015eb /Userland/Libraries/LibC
parentf485db2501c32bd626d58973c8a34a81e09ca5dc (diff)
downloadserenity-3e8b5ac92012e19847e536a20a3f0ec7e5c787d3.zip
AK+Everywhere: Turn bool keep_empty to an enum in split* functions
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/getopt.cpp2
-rw-r--r--Userland/Libraries/LibC/grp.cpp2
-rw-r--r--Userland/Libraries/LibC/pwd.cpp2
-rw-r--r--Userland/Libraries/LibC/shadow.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibC/getopt.cpp b/Userland/Libraries/LibC/getopt.cpp
index 3c6b346e6c..9819f356d3 100644
--- a/Userland/Libraries/LibC/getopt.cpp
+++ b/Userland/Libraries/LibC/getopt.cpp
@@ -138,7 +138,7 @@ int OptionParser::getopt()
bool OptionParser::lookup_short_option(char option, int& needs_value) const
{
- Vector<StringView> parts = m_short_options.split_view(option, true);
+ Vector<StringView> parts = m_short_options.split_view(option, SplitBehavior::KeepEmpty);
VERIFY(parts.size() <= 2);
if (parts.size() < 2) {
diff --git a/Userland/Libraries/LibC/grp.cpp b/Userland/Libraries/LibC/grp.cpp
index 5bfa1b7277..7d90833e9d 100644
--- a/Userland/Libraries/LibC/grp.cpp
+++ b/Userland/Libraries/LibC/grp.cpp
@@ -73,7 +73,7 @@ struct group* getgrnam(char const* name)
static bool parse_grpdb_entry(String const& line)
{
- auto parts = line.split_view(':', true);
+ auto parts = line.split_view(':', SplitBehavior::KeepEmpty);
if (parts.size() != 4) {
warnln("getgrent(): Malformed entry on line {}: '{}' has {} parts", s_line_number, line, parts.size());
return false;
diff --git a/Userland/Libraries/LibC/pwd.cpp b/Userland/Libraries/LibC/pwd.cpp
index 3d9ffcb156..f3ef1aa505 100644
--- a/Userland/Libraries/LibC/pwd.cpp
+++ b/Userland/Libraries/LibC/pwd.cpp
@@ -73,7 +73,7 @@ struct passwd* getpwnam(char const* name)
static bool parse_pwddb_entry(String const& line)
{
- auto parts = line.split_view(':', true);
+ auto parts = line.split_view(':', SplitBehavior::KeepEmpty);
if (parts.size() != 7) {
dbgln("getpwent(): Malformed entry on line {}", s_line_number);
return false;
diff --git a/Userland/Libraries/LibC/shadow.cpp b/Userland/Libraries/LibC/shadow.cpp
index 099fca4cae..53739944f8 100644
--- a/Userland/Libraries/LibC/shadow.cpp
+++ b/Userland/Libraries/LibC/shadow.cpp
@@ -64,7 +64,7 @@ struct spwd* getspnam(char const* name)
static bool parse_shadow_entry(String const& line)
{
- auto parts = line.split_view(':', true);
+ auto parts = line.split_view(':', SplitBehavior::KeepEmpty);
if (parts.size() != 9) {
dbgln("getspent(): Malformed entry on line {}", s_line_number);
return false;