PR: Restore nearby unusual formatting.
authorJay Krell <jaykrell@microsoft.com>
Fri, 14 Jun 2019 04:36:41 +0000 (21:36 -0700)
committerLarry Ewing <lewing@microsoft.com>
Tue, 18 Jun 2019 02:53:08 +0000 (21:53 -0500)
Commit migrated from https://github.com/mono/mono/commit/af2c235f318999b820fee48208916ce3e9de75c4

src/mono/mono/metadata/w32file-unix.c
src/mono/mono/mini/intrinsics.c
src/mono/mono/utils/os-event-unix.c

index 50b1151..99d3924 100644 (file)
@@ -5010,7 +5010,9 @@ mono_w32file_copy (const gunichar2 *path, const gunichar2 *dest, gboolean overwr
 gboolean
 mono_w32file_replace (const gunichar2 *destination_file_name, const gunichar2 *source_file_name, const gunichar2 *destination_backup_file_name, guint32 flags, gint32 *error)
 {
-       const gboolean result = ReplaceFile (destination_file_name, source_file_name, destination_backup_file_name, flags, NULL, NULL);
+       gboolean result;
+
+       result = ReplaceFile (destination_file_name, source_file_name, destination_backup_file_name, flags, NULL, NULL);
        if (!result)
                *error = mono_w32error_get_last ();
        return result;
@@ -5019,11 +5021,13 @@ mono_w32file_replace (const gunichar2 *destination_file_name, const gunichar2 *s
 gint64
 mono_w32file_get_file_size (gpointer handle, gint32 *error)
 {
+       gint64 length;
        guint32 length_hi = 0;
 
-       const gint64 length = GetFileSize (handle, &length_hi);
-       if (length == INVALID_FILE_SIZE)
-               *error = mono_w32error_get_last ();
+       length = GetFileSize (handle, &length_hi);
+       if(length==INVALID_FILE_SIZE) {
+               *error=mono_w32error_get_last ();
+       }
 
        return length | ((gint64)length_hi << 32);
 }
index dbff853..9da5a5a 100644 (file)
@@ -1462,7 +1462,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                 * we avoid folding constants that when computed would raise an error, in
                 * case the user code was expecting to get that error raised
                 */
-               if (fsig->param_count == 1 && args [0]->opcode == OP_R8CONST) {
+               if (fsig->param_count == 1 && args [0]->opcode == OP_R8CONST){
                        double source = *(double *)args [0]->inst_p0;
                        int opcode = 0;
                        const char *mname = cmethod->name;
@@ -1471,50 +1471,50 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        if (c == 'A'){
                                if (strcmp (mname, "Abs") == 0 && fsig->params [0]->type == MONO_TYPE_R8) {
                                        opcode = OP_ABS;
-                               } else if (strcmp (mname, "Asin") == 0) {
+                               } else if (strcmp (mname, "Asin") == 0){
                                        if (fabs (source) <= 1)
                                                opcode = OP_ASIN;
-                               } else if (strcmp (mname, "Asinh") == 0) {
+                               } else if (strcmp (mname, "Asinh") == 0){
                                        opcode = OP_ASINH;
-                               } else if (strcmp (mname, "Acos") == 0) {
+                               } else if (strcmp (mname, "Acos") == 0){
                                        if (fabs (source) <= 1)
                                                opcode = OP_ACOS;
-                               } else if (strcmp (mname, "Acosh") == 0) {
+                               } else if (strcmp (mname, "Acosh") == 0){
                                        if (source >= 1)
                                                opcode = OP_ACOSH;
-                               } else if (strcmp (mname, "Atan") == 0) {
+                               } else if (strcmp (mname, "Atan") == 0){
                                        opcode = OP_ATAN;
-                               } else if (strcmp (mname, "Atanh") == 0) {
+                               } else if (strcmp (mname, "Atanh") == 0){
                                        if (fabs (source) < 1)
                                                opcode = OP_ATANH;
                                } 
-                       } else if (c == 'C') {
+                       } else if (c == 'C'){
                                if (strcmp (mname, "Cos") == 0) {
                                        if (!isinf (source))
                                                opcode = OP_COS;
-                               } else if (strcmp (mname, "Cbrt") == 0) {
+                               } else if (strcmp (mname, "Cbrt") == 0){
                                        opcode = OP_CBRT;
-                               } else if (strcmp (mname, "Cosh") == 0) {
+                               } else if (strcmp (mname, "Cosh") == 0){
                                        opcode = OP_COSH;
                                }
-                       } else if (c == 'R') {
+                       } else if (c == 'R'){
                                if (strcmp (mname, "Round") == 0)
                                        opcode = OP_ROUND;
-                       } else if (c == 'S') {
+                       } else if (c == 'S'){
                                if (strcmp (mname, "Sin") == 0) {
                                        if (!isinf (source))
                                                opcode = OP_SIN;
                                } else if (strcmp (mname, "Sqrt") == 0) {
                                        if (source >= 0)
                                                opcode = OP_SQRT;
-                               } else if (strcmp (mname, "Sinh") == 0) {
+                               } else if (strcmp (mname, "Sinh") == 0){
                                        opcode = OP_SINH;
                                }
-                       } else if (c == 'T') {
+                       } else if (c == 'T'){
                                if (strcmp (mname, "Tan") == 0){
                                        if (!isinf (source))
                                                opcode = OP_TAN;
-                               } else if (strcmp (mname, "Tanh") == 0) {
+                               } else if (strcmp (mname, "Tanh") == 0){
                                        opcode = OP_TANH;
                                }
                        }
@@ -1527,7 +1527,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                                ins->dreg = mono_alloc_dreg (cfg, (MonoStackType) ins->type);
                                ins->inst_p0 = dest;
                                
-                               switch (opcode) {
+                               switch (opcode){
                                case OP_ABS:
                                        result = fabs (source);
                                        break;
index 8f4de86..d30fcaf 100644 (file)
@@ -102,7 +102,9 @@ typedef struct {
 static void
 signal_and_unref (gpointer user_data)
 {
-       OSEventWaitData *data = (OSEventWaitData*) user_data;
+       OSEventWaitData *data;
+
+       data = (OSEventWaitData*) user_data;
 
        mono_os_event_set (&data->event);
        if (mono_atomic_dec_i32 ((gint32*) &data->ref) == 0) {