9b0ebb
--- sysstr-orig.c	2022-07-27 09:44:52.606408000 +0200
9b0ebb
+++ sysstr.c	2022-07-27 09:54:24.043081352 +0200
90e381
@@ -74,19 +74,11 @@
90e381
 int
90e381
 str_open(const struct mystr* p_str, const enum EVSFSysStrOpenMode mode)
90e381
 {
9b0ebb
-  enum EVSFSysUtilOpenMode open_mode = kVSFSysUtilOpenUnknown;
90e381
-  switch (mode)
90e381
-  {
90e381
-    case kVSFSysStrOpenReadOnly:
90e381
-      open_mode = kVSFSysUtilOpenReadOnly;
90e381
-      break;
90e381
-    case kVSFSysStrOpenUnknown:
90e381
-      /* Fall through */
90e381
-    default:
90e381
-      bug("unknown mode value in str_open");
90e381
-      break;
90e381
-  }
90e381
-  return vsf_sysutil_open_file(str_getbuf(p_str), open_mode);
90e381
+  if (mode == kVSFSysStrOpenReadOnly)
90e381
+    return vsf_sysutil_open_file(str_getbuf(p_str), kVSFSysUtilOpenReadOnly);
90e381
+
90e381
+  bug("unknown mode value in str_open");
90e381
+  return -1;
90e381
 }
90e381
 
90e381
 int