Azure IoT common library

Fork of azure_c_shared_utility by Azure IoT

Revision:
1:9190c0f4d23a
Parent:
0:fa2de1b79154
Child:
6:c55b013dfc2a
diff -r fa2de1b79154 -r 9190c0f4d23a gballoc.c
--- a/gballoc.c	Fri Apr 08 12:01:36 2016 -0700
+++ b/gballoc.c	Sun Apr 24 16:41:14 2016 -0700
@@ -88,7 +88,7 @@
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_048: [If acquiring the lock fails, gballoc_malloc shall return NULL.] */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
         result = NULL;
     }
     else
@@ -143,7 +143,7 @@
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_046: [If acquiring the lock fails, gballoc_calloc shall return NULL.] */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
         result = NULL;
     }
     else
@@ -200,7 +200,7 @@
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_047: [If acquiring the lock fails, gballoc_realloc shall return NULL.] */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
         result = NULL;
     }
     else
@@ -293,7 +293,7 @@
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_049: [If acquiring the lock fails, gballoc_free shall do nothing.] */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
     }
     else
     {
@@ -327,7 +327,7 @@
         /* Codes_SRS_GBALLOC_01_019: [When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_free shall not free any memory.] */
 
         /* could not find the allocation */
-        LogError("Could not free allocation for address %p (not found)\r\n", ptr);
+        LogError("Could not free allocation for address %p (not found)", ptr);
     }
         (void)Unlock(gballocThreadSafeLock);
     }
@@ -340,14 +340,14 @@
     /* Codes_SRS_GBALLOC_01_038: [If gballoc was not initialized gballoc_getMaximumMemoryUsed shall return MAX_INT_SIZE.] */
     if (gballocState != GBALLOC_STATE_INIT)
     {
-        LogError("gballoc is not initialized.\r\n");
+        LogError("gballoc is not initialized.");
         result = SIZE_MAX;
     }
     /* Codes_SRS_GBALLOC_01_034: [gballoc_getMaximumMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.]  */
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_050: [If the lock cannot be acquired, gballoc_getMaximumMemoryUsed shall return SIZE_MAX.]  */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
         result = SIZE_MAX;
     }
     else
@@ -367,14 +367,14 @@
     /* Codes_SRS_GBALLOC_01_044: [If gballoc was not initialized gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */
     if (gballocState != GBALLOC_STATE_INIT)
     {
-        LogError("gballoc is not initialized.\r\n");
+        LogError("gballoc is not initialized.");
         result = SIZE_MAX;
     }
     /* Codes_SRS_GBALLOC_01_036: [gballoc_getCurrentMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.]*/
     else if (LOCK_OK != Lock(gballocThreadSafeLock))
     {
         /* Codes_SRS_GBALLOC_01_051: [If the lock cannot be acquired, gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */
-        LogError("Failed to get the Lock.\r\n");
+        LogError("Failed to get the Lock.");
         result = SIZE_MAX;
     }
     else