sds
sds copied to clipboard
Simple Dynamic Strings library for C
In the function sdsnewlen we can see the test on a pointer that was already used as in: sh = s_malloc(hdrlen+initlen+1); if (!init) memset(sh, 0, hdrlen+initlen+1); if (sh == NULL)...
Hi, I do not know if you have chosen due to performance issues but I think that these checkings add more stability and some fault tolerance. I observed more places...
The `seplen` argument introduced in 7f492496 was removed in f74b9b78 without updating the README.
These two commits make sds compile with a C++ compiler. There are still warnings about `long long` and `buf[]`. However, I think that most compilers support those C99 features, only...
I wrote this function for a linked list with items that had binary string keys and if the item existed it would only update it's value and not the key...
It looks like using functions instead of macros we’re gaining some readability, as the macro required several lines, and we’re enforcing the type checks. I’ve added `` dependency, that if...
By running a static analyzer, I got this information and I'd like to share. [src/sds.c:159]: (error) Common realloc mistake: 'sh' nulled but not freed upon failure [src/sds.c:717]: (error) Common realloc...
I've detected two typos at https://github.com/antirez/sds Please search for: - simple gaol of representing - In many progrems it is useful