Skip to content

Commit

Permalink
Fix an outdated comment in the allocator example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacajack committed Oct 14, 2021
1 parent 0eadb77 commit 3f8ebeb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/lightmodbus.dox
Original file line number Diff line number Diff line change
Expand Up @@ -613,16 +613,15 @@ LIGHTMODBUS_WARN_UNUSED ModbusError modbusStaticAllocator(ModbusBuffer *buffer,
}
else
{
// Return a pointer to one of the static buffers depending
// on the declared purpose of the buffer
// Return a pointer to our buffer
buffer->data = request;
return MODBUS_OK;
}
}
}
~~~

One could also implement the allocator to allocate memory from different statically allocated buffers
One could also implement an allocator allocating memory from different statically allocated buffers
based on `buffer` pointers, using the user context for bookkeeping.

\page examples Examples
Expand Down

0 comments on commit 3f8ebeb

Please sign in to comment.