OSDN Git Service

Fix of memset usage
authorArseniy Antonov <arseniy.antonov@intel.com>
Fri, 19 Sep 2014 13:08:23 +0000 (17:08 +0400)
committerArseniy Antonov <arseniy.antonov@intel.com>
Fri, 19 Sep 2014 13:08:23 +0000 (17:08 +0400)
Build process failed following error (GCC 5.0):
btif_storage.c:1503:9: error: 'memset' used with constant zero length parameter; this could be due to transposed parameters [-Werror=memset-transposed-args]

Change-Id: I46e0d8bd6fcd9439b50b4f0aed5391c808b9eb73
Signed-off-by: Arseniy Antonov <arseniy.antonov@intel.com>
btif/src/btif_storage.c

index 65cffbc..81e00e4 100644 (file)
@@ -1500,7 +1500,7 @@ bt_status_t btif_storage_read_hl_apps_cb(char *value, int value_size)
 
     if (!btif_config_exist("Local", BTIF_STORAGE_HL_APP, BTIF_STORAGE_HL_APP_CB))
     {
-        memset(value, value_size, 0);
+        memset(value, 0, value_size);
         if (!btif_config_set("Local", BTIF_STORAGE_HL_APP,BTIF_STORAGE_HL_APP_CB,
                              value, value_size, BTIF_CFG_TYPE_BIN))
         {