config: rename parse_logsize to be more generic

Rename config_parse_logsize to config_parse_bytesize.
A more generic name allows this function to be reused in other
config parsing purposes.

Change-Id: I3036c184669be17ddc0d194f275ea05d871341d1
Signed-off-by: Medicine Yeh <medicinehy@gmail.com>
diff --git a/test/meson.build b/test/meson.build
index 0d08d19..39c9784 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,7 +1,7 @@
 tests = [
 	'test-client-escape',
 	'test-config-parse',
-	'test-config-parse-logsize',
+	'test-config-parse-bytesize',
 	'test-config-resolve-console-id',
 	'test-ringbuffer-boundary-poll',
 	'test-ringbuffer-boundary-read',
diff --git a/test/test-config-parse-logsize.c b/test/test-config-parse-bytesize.c
similarity index 91%
rename from test/test-config-parse-logsize.c
rename to test/test-config-parse-bytesize.c
index 1c64e47..165dab5 100644
--- a/test/test-config-parse-logsize.c
+++ b/test/test-config-parse-bytesize.c
@@ -16,9 +16,11 @@
 	int expected_rc;
 };
 
-void test_config_parse_logsize(void)
+void test_config_parse_bytesize(void)
 {
 	const struct test_parse_size_unit test_data[] = {
+		{ NULL, 0, -1 },
+		{ "", 0, -1 },
 		{ "0", 0, -1 },
 		{ "1", 1, 0 },
 		{ "4k", 4ul * 1024ul, 0 },
@@ -46,7 +48,7 @@
 	int rc;
 
 	for (i = 0; i < num_tests; i++) {
-		rc = config_parse_logsize(test_data[i].test_str, &size);
+		rc = config_parse_bytesize(test_data[i].test_str, &size);
 
 		if (rc == -1 && rc != test_data[i].expected_rc) {
 			warn("[%zu] Str %s expected rc %d, got rc %d\n", i,
@@ -66,6 +68,6 @@
 
 int main(void)
 {
-	test_config_parse_logsize();
+	test_config_parse_bytesize();
 	return EXIT_SUCCESS;
 }