summaryrefslogtreecommitdiff
path: root/lib/snmp/src/agent/snmp_generic_mnesia.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/src/agent/snmp_generic_mnesia.erl')
-rw-r--r--lib/snmp/src/agent/snmp_generic_mnesia.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/snmp/src/agent/snmp_generic_mnesia.erl b/lib/snmp/src/agent/snmp_generic_mnesia.erl
index 131b9b0368..37bf23a5b6 100644
--- a/lib/snmp/src/agent/snmp_generic_mnesia.erl
+++ b/lib/snmp/src/agent/snmp_generic_mnesia.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2023. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@
%%%-----------------------------------------------------------------
%%------------------------------------------------------------------
-%% Theses functions could be in the MIB for simple
+%% These functions could be in the MIB for simple
%% variables or tables, i.e. vars without complex
%% set-operations. If there are complex set op, an
%% extra layer-function should be added, and that
@@ -185,8 +185,8 @@ make_row2(RowList, 1) -> RowList;
make_row2([_OtherIndex | RowList], N) ->
make_row2(RowList, N-1).
-make_row_list(Row) ->
- make_row_list(size(Row), Row, []).
+make_row_list(Row) when is_tuple(Row) ->
+ make_row_list(tuple_size(Row), Row, []).
make_row_list(N, Row, Acc) when N > 2 ->
make_row_list(N-1, Row, [element(N, Row) | Acc]);
make_row_list(2, Row, Acc) ->