summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2016-10-05 22:12:11 +0200
committerKrzysztof Opasiak <k.opasiak@samsung.com>2016-10-05 22:12:11 +0200
commit1ca3803639779ae0505abf31adb9456e081fe4e6 (patch)
tree9ba7dc0bec63f598dde454da965f1c023649962b /src
parentab3630b21f72dfd606e702e600f57d904b501557 (diff)
downloadlibusbg-1ca3803639779ae0505abf31adb9456e081fe4e6.tar.gz
libusbg-1ca3803639779ae0505abf31adb9456e081fe4e6.tar.bz2
libusbg-1ca3803639779ae0505abf31adb9456e081fe4e6.zip
Remove redundant assignments
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/usbg.c4
-rw-r--r--src/usbg_common.c2
-rw-r--r--src/usbg_schemes_libconfig.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/usbg.c b/src/usbg.c
index 2557ff5..ef3ec9f 100644
--- a/src/usbg.c
+++ b/src/usbg.c
@@ -907,7 +907,7 @@ err:
static int usbg_parse_state(usbg_state *s)
{
- int ret = USBG_SUCCESS;
+ int ret;
/*
* USBG_ERROR_NOT_FOUND is returned if we are running on machine where
@@ -938,7 +938,7 @@ out:
int usbg_init(const char *configfs_path, usbg_state **state)
{
- int ret = USBG_SUCCESS;
+ int ret;
DIR *dir;
char *path;
usbg_state *s;
diff --git a/src/usbg_common.c b/src/usbg_common.c
index 2a6b86c..bb9eb13 100644
--- a/src/usbg_common.c
+++ b/src/usbg_common.c
@@ -128,7 +128,7 @@ int usbg_read_string_alloc(const char *path, const char *name,
{
char buf[USBG_MAX_FILE_SIZE];
char *new_buf = NULL;
- int ret = USBG_SUCCESS;
+ int ret;
ret = usbg_read_string(path, name, file, buf);
if (ret != USBG_SUCCESS)
diff --git a/src/usbg_schemes_libconfig.c b/src/usbg_schemes_libconfig.c
index d8b92d2..cd51d58 100644
--- a/src/usbg_schemes_libconfig.c
+++ b/src/usbg_schemes_libconfig.c
@@ -411,7 +411,7 @@ static int usbg_export_gadget_strs_lang(usbg_gadget *g, const char *lang_str,
usbg_gadget_strs strs;
int lang;
int usbg_ret, cfg_ret;
- int ret = USBG_ERROR_NO_MEM;
+ int ret;
ret = sscanf(lang_str, "%x", &lang);
if (ret != 1) {