diff --git a/baselib/msglib/src/standard/messenger_device_session_manager.c b/baselib/msglib/src/standard/messenger_device_session_manager.c index 016102fdc37f37447284be4a31885201c18a235c..9548fe88d8750c0d30b42b821b8b974f2edf203b 100644 --- a/baselib/msglib/src/standard/messenger_device_session_manager.c +++ b/baselib/msglib/src/standard/messenger_device_session_manager.c @@ -12,19 +12,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include "messenger_device_session_manager.h" #include #include "securec.h" #include "session.h" #include "softbus_bus_center.h" - #include "utils_list.h" #include "utils_log.h" #include "utils_mem.h" #include "utils_mutex.h" -#include "messenger_device_session_manager.h" #include "messenger_device_status_manager.h" #include "messenger_utils.h" diff --git a/baselib/msglib/src/standard/messenger_device_status_manager.c b/baselib/msglib/src/standard/messenger_device_status_manager.c index 24f8043a75ae7c28df49e04e6e279acac9a8cc99..b94a8f7e4c852e558ad7f8c1e083f518770cef1a 100644 --- a/baselib/msglib/src/standard/messenger_device_status_manager.c +++ b/baselib/msglib/src/standard/messenger_device_status_manager.c @@ -77,7 +77,7 @@ static void ProcessDeviceStatusReceived(const uint8_t *data, uint32_t len) FREE(queueData); } -static inline void ProcessDeviceStatusReceiver(const DeviceIdentify *devId, uint32_t status, uint32_t devType) +static void ProcessDeviceStatusReceiver(const DeviceIdentify *devId, uint32_t status, uint32_t devType) { DeviceStatusManager *instance = GetDeviceManagerInstance(); diff --git a/baselib/utils/src/utils_base64.c b/baselib/utils/src/utils_base64.c index 7b0a73fc4ea19f06b1525b9b036306d022e4c4e7..0e8cec35d309da5fabc4b3befd0e9d4288ef0aaa 100644 --- a/baselib/utils/src/utils_base64.c +++ b/baselib/utils/src/utils_base64.c @@ -113,10 +113,10 @@ static int32_t Base64Decode(const uint8_t *from, uint8_t *to, uint32_t toCheckLe } uint32_t toLen = fromLen / 4 * 3; /* Base64 decode size */ - if (from[fromLen - 1] == '=') { /* if last bit is null, make it "=" */ + if (from[fromLen - 1] == '=') { /* if last 1-bit is null, make it "=" */ toLen--; } - if (from[fromLen - 2] == '=') { /* if Second-to-last bit is null, make it "=" */ + if (from[fromLen - 2] == '=') { /* if last 2-bit is null, make it "=" */ toLen--; } if (toCheckLen < toLen) { @@ -141,10 +141,10 @@ static int32_t Base64Decode(const uint8_t *from, uint8_t *to, uint32_t toCheckLe (((a << 18) & 0x00FC0000) | ((b << 12) & 0x0003F000) | ((c << 6) & 0x00000FC0) | ((d << 0) & 0x0000003F)); if (j < toLen) { - to[j++] = (byte >> 16) & 0xFF; + to[j++] = (byte >> 16) & 0xFF; // 16, the 3rd 8-bit } if (j < toLen) { - to[j++] = (byte >> 8) & 0xFF; + to[j++] = (byte >> 8) & 0xFF; // 8, the 2nd 8-bit } if (j < toLen) { to[j++] = (byte >> 0) & 0xFF;