summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/camcontrol/modeedit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sbin/camcontrol/modeedit.c b/sbin/camcontrol/modeedit.c
index 8262c3c..c98e0c5 100644
--- a/sbin/camcontrol/modeedit.c
+++ b/sbin/camcontrol/modeedit.c
@@ -193,7 +193,14 @@ editentry_save(void *hook __unused, char *name)
struct editentry *src; /* Entry value to save. */
src = editentry_lookup(name);
- assert(src != NULL);
+ if (src == 0) {
+ /*
+ * This happens if field does not fit into read page size.
+ * It also means that this field won't be written, so the
+ * returned value does not really matter.
+ */
+ return (0);
+ }
switch (src->type) {
case 'i': /* Byte-sized integral type. */
OpenPOWER on IntegriCloud