tep_*host_bigendian()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tzvetomir,

I was looking at the code for tep_is_file_bigendian(),
tep_is_host_bigendian() and tep_host_bigendian().

The tep_host_bigendian() checks if the current machine that is
executing is bigendian or not.

tep_is_host_bigendian() looks at the pevent to see what it has, which
should be the same as tep_host_bigendian().

tep_is_file_bigendian() is if the raw file format is bigendian or not.
If the file does not mach the host, byte swapping needs to be made.

Looking at this deeper, I think the names are backwards.

Let's rename tep_host_bigendian() to tep_is_host_bigendian()
      rename tep_is_host_bigendian() to tep_host_bigendian()
      rename tep_is_file_bigendian() to tep_file_bigendian()


The "is_host" to me sounds more like we are testing the actual host,
where as just saying 'tep_host_bigendian' sounds to me that it's what
the pevent has the host set as.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux