Commit graph

3 commits

Author SHA1 Message Date
Daniel Danzberger
521e38a853 Fix snprintf destination buffer sizes
Fixes snprintf truncated output compiler warnings.

Example:
--
../dmentrylibrary.c:31:38: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=]
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
      |                                      ^
../dmentrylibrary.c:31:5: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 256
   31 |     snprintf(buf, sizeof(buf), "%s/%s", folder_path, entry->d_name);
--

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
2020-03-10 14:34:08 +01:00
Amin Ben Ramdhane
ff14c27fc3 clean up the source code
- remove unused variables
- fix coding style of most function (Indentation, Tabulation, ..)
- check the source code using cppcheck tool
- change sprintf by snprintf
2020-02-12 19:08:49 +01:00
Amin Ben Ramdhane
4ab526b9f2 Ticket refs#1598: libbbfdm: plug-in based with support for dynamic loading of libraries + separate libbbfdm into two libraries: libbbf_api (API) and libbbfdm (data model) 2020-01-21 22:43:37 +01:00