aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-29 23:52:10 +0100
committerGitHub <noreply@github.com>2023-11-29 23:52:10 +0100
commit47dee43160f696ed079cc2e553d73cc4b663c9fa (patch)
treeb1724f25626798830a05108260d204291ec12d73
parent74296896cb1ceefecd489f3dd423400e4caa892b (diff)
parentadb94ff9264ca54f1554cdc1c0b2e7e290f9be89 (diff)
Merge pull request #29486 from vespa-engine/balder/try-to-avoid-compiler-warningv8.266.20
Exit if there is a missing pattern argument.
-rw-r--r--fbench/src/splitfile/splitfile.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/fbench/src/splitfile/splitfile.cpp b/fbench/src/splitfile/splitfile.cpp
index 65eb0009564..8eddc163463 100644
--- a/fbench/src/splitfile/splitfile.cpp
+++ b/fbench/src/splitfile/splitfile.cpp
@@ -28,6 +28,10 @@ main(int argc, char** argv)
switch(opt) {
case 'p':
pattern = optarg;
+ if (pattern == nullptr) {
+ printf("Missing 'pattern' argument to -p option !\n");
+ return -1;
+ }
break;
case 'm':
linebufsize = atoi(optarg);