daily update
[deliverable/binutils-gdb.git] / bfd / vms-misc.c
index c7bd346837098a69421ebbf50f45b8b356e0fe36..a2665b7e4f938986a45aeb3e5394278ff8b5d23a 100644 (file)
@@ -348,7 +348,7 @@ _bfd_vms_output_quad (struct vms_rec_wr *recwr, bfd_vma value)
 /* Output c-string as counted string.  */
 
 void
-_bfd_vms_output_counted (struct vms_rec_wr *recwr, char *value)
+_bfd_vms_output_counted (struct vms_rec_wr *recwr, const char *value)
 {
   int len;
 
@@ -366,13 +366,13 @@ _bfd_vms_output_counted (struct vms_rec_wr *recwr, char *value)
       return;
     }
   _bfd_vms_output_byte (recwr, (unsigned int) len & 0xff);
-  _bfd_vms_output_dump (recwr, (unsigned char *) value, len);
+  _bfd_vms_output_dump (recwr, (const unsigned char *)value, len);
 }
 
 /* Output character area.  */
 
 void
-_bfd_vms_output_dump (struct vms_rec_wr *recwr, unsigned char *data, int len)
+_bfd_vms_output_dump (struct vms_rec_wr *recwr, const unsigned char *data, int len)
 {
   vms_debug2 ((6, "_bfd_vms_output_dump (%d)\n", len));
 
@@ -401,8 +401,8 @@ _bfd_vms_output_fill (struct vms_rec_wr *recwr, int value, int count)
    using undocumented system call sys$modify().
    Pure VMS version.  */
 
-void
-_bfd_vms_convert_to_var (char * vms_filename)
+static void
+vms_convert_to_var (char * vms_filename)
 {
   struct FAB fab = cc$rms_fab;
 
@@ -433,8 +433,8 @@ vms_convert_to_var_1 (char *filename, int type)
    using undocumented system call sys$modify().
    Unix filename version.  */
 
-static int
-vms_convert_to_var_unix_filename (const char *unix_filename)
+int
+_bfd_vms_convert_to_var_unix_filename (const char *unix_filename)
 {
   if (decc$to_vms (unix_filename, &vms_convert_to_var_1, 0, 1) != 1)
     return FALSE;
@@ -585,16 +585,8 @@ vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *lo)
   /* Put into val.  */
   val[0] = ut & 0xffff;
   val[1] = (ut >> 16) & 0xffff;
-  if (sizeof (ut) > 4)
-    {
-      val[2] = (ut >> 32) & 0xffff;
-      val[3] = (ut >> 48) & 0xffff;
-    }
-  else
-    {
-      val[2] = 0;
-      val[3] = 0;
-    }
+  val[2] = sizeof (ut) > 4 ? (ut >> 32) & 0xffff : 0;
+  val[3] = sizeof (ut) > 4 ? (ut >> 48) & 0xffff : 0;
 
   /* Add offset.  */
   tmp[0] = VMS_TIME_OFFSET & 0xffff;
This page took 0.024455 seconds and 4 git commands to generate.