apply tizen coding style 29/149229/1
authorYoungjae Shin <yj99.shin@samsung.com>
Tue, 12 Sep 2017 02:16:46 +0000 (11:16 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Tue, 12 Sep 2017 02:16:46 +0000 (11:16 +0900)
Change-Id: I688bf24f9e92cc0488eac926469503287fff1ee0

doc/tizen_doc.h
include/private/tizen_error_private.h
include/tizen.h
include/tizen_error.h
include/tizen_type.h
src/tizen_error.c
tool/tizen_error_private_template.h

index 5addc0a..eb25593 100755 (executable)
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 
@@ -25,6 +25,6 @@
  * @section CAPI_COMMON_ERROR_OVERVIEW Overview
  * This file declares common errors and provides following features for handling the error.
  * - Getting/Setting the error value.
- * - Retrieving the error messages with error value. 
+ * - Retrieving the error messages with error value.
  */
 
index 254c6f9..17d484e 100644 (file)
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 
index ce0f0be..60630db 100755 (executable)
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 #ifndef __TIZEN_H__
@@ -31,5 +31,5 @@
 #              define TIZEN_DEPRECATED_API
 #      endif
 #endif
-#endif // __TIZEN_H__
\ No newline at end of file
+
+#endif // __TIZEN_H__
index d08c4ff..b292372 100644 (file)
@@ -242,21 +242,21 @@ extern "C" {
 /* Tizen Buffer Manager Error */
 #define TIZEN_ERROR_TBM                        -0x02830000
 /* Tizen EOM Error */
-#define TIZEN_ERROR_EOM                -0x02840000
+#define TIZEN_ERROR_EOM                        -0x02840000
 /* Tizen PANEL Error */
-#define TIZEN_ERROR_PANEL       -0x02850000
+#define TIZEN_ERROR_PANEL              -0x02850000
 /* Tizen TZSH Error */
-#define TIZEN_ERROR_TZSH       -0x02860000
+#define TIZEN_ERROR_TZSH               -0x02860000
 /* Tizen Download Error */
-#define TIZEN_ERROR_DOWNLOAD           -0x02A00000
+#define TIZEN_ERROR_DOWNLOAD   -0x02A00000
 /* Tizen WebView Error */
 #define TIZEN_ERROR_WEBVIEW            -0x02A10000
 /* Tizen Location Manager Error */
 #define TIZEN_ERROR_LOCATION_MANAGER   -0x02C00000
 /* Tizen Geofence Manager Error */
-#define TIZEN_ERROR_GEOFENCE_MANAGER    -0x02C10000
+#define TIZEN_ERROR_GEOFENCE_MANAGER   -0x02C10000
 /* Tizen Maps Service Error */
-#define TIZEN_ERROR_MAPS_SERVICE -0x02C20000
+#define TIZEN_ERROR_MAPS_SERVICE               -0x02C20000
 /* Tizen STT Error */
 #define TIZEN_ERROR_STT                        -0x02F00000
 /* Tizen TTS Error */
@@ -387,7 +387,7 @@ typedef enum {
        TIZEN_ERROR_END_OF_COLLECTION,
        } tizen_error_e;
 
-       
+
 /**
  * @brief Gets the last error code in the thread.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -398,7 +398,7 @@ typedef enum {
 */
 int get_last_result(void);
 
-       
+
 /**
  * @brief Sets the last error code to be returned in the thread.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -408,7 +408,7 @@ int get_last_result(void);
 */
 void set_last_result(int err);
 
-       
+
 /**
  * @brief Gets the message for given the error code.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
@@ -431,12 +431,12 @@ void set_last_result(int err);
  */
 char *get_error_message(int err);
 
-       
+
 /**
  * @}
  */
+
+
 #ifdef __cplusplus
 }
 
index 718dd5b..90091e5 100755 (executable)
@@ -11,9 +11,9 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
+
 #ifndef __TIZEN_TYPE_H__
 #define __TIZEN_TYPE_H__
 
@@ -22,7 +22,7 @@
 #ifndef NULL
        #ifdef __cplusplus
                #define NULL        (0L)
-       #else 
+       #else
                #define NULL        ((void*) 0)
        #endif
 #endif
index 1fd722b..ec0db35 100644 (file)
@@ -59,21 +59,18 @@ char *get_error_message(int err_code)
        if (err_code == 0) {
                strncpy(msg, "Successful", strlen("Successful"));
        } else if (err_code >= TIZEN_ERROR_OWNER_DEAD && err_code < 0) {
-               if ((~err_code + 1) == -ENOSYS) {
+               if ((~err_code + 1) == -ENOSYS)
                        strncpy(msg, "Invalid operation", strlen("Invalid operation"));
-               } else {
+               else
                        strerror_r(~err_code + 1, msg, sizeof(msg));
-               }
        } else if (err_code >= TIZEN_ERROR_MIN_PLATFORM_ERROR && err_code < TIZEN_ERROR_END_OF_COLLECTION) {
                tmp = _get_error_message(err_code);
-               if (tmp != NULL) {
+               if (tmp != NULL)
                        strncpy(msg, tmp, strlen(tmp));
-               }
        } else if (err_code >= TIZEN_ERROR_MIN_PLATFORM_MODULE && err_code < -0x009F0000) {
                tmp = _get_error_message(err_code);
-               if (tmp != NULL) {
+               if (tmp != NULL)
                        strncpy(msg, tmp, strlen(tmp));
-               }
        } else {;
        }
        return msg;
index 96c53a8..3822745 100644 (file)
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */