7 Commits
Author SHA1 Message Date
William Douglas dd3e0f3d81 Update copyright years
Signed-off-by: William Douglas <william.douglas@intel.com>
2025-04-24 14:20:58 -07:00
Otavio Pontes 5f67a46354 string: Add function to convert from string to unsigned ints
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-05-12 12:27:06 -07:00
Otavio Pontes 3f87d09f2b Updating copyright headers of files changed on 2020
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-05-01 14:00:11 -07:00
Otavio Pontes 203b9e35ca macros: Create a wrapper for free()
On several points on swupd we need to free a pointer and then set it to
NULL. This is made in some areas using the free_and_clear_pointer(). But
most places free_and_clear_pointer() is used, this is not really necessary.

On the other hand it's hard to make sure that we are really setting to NULL
every pointer that we need, so we're adding a more conservative approach on
setting every pointer to NULL after free using a wrapper.

The greatest advantage of this wrapper over free_and_clear_pointer() is that
it's not type dependent and we don't need to call it with a pointer of a pointer,
so calls look more to calls to a standard free.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-29 10:20:50 -07:00
Otavio Pontes 73a6d0055c strings: Create safer wrapper to strcmp()
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-23 08:55:45 -07:00
Otavio Pontes bbd7da491d strings: renaming functions to have a str_ prefix
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-04-23 08:55:45 -07:00
Otavio Pontes 8648e83c33 test: Add first swupd unit test
Adding a unit test for string functions on string.h module.
Unit tests will help us to test functions that are hard to test
with function tests. String conversions, for example would be extremely
hard to test using functional tests.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-01-31 10:55:17 -08:00