* lo_ntoh64 * converts a 64-bit integer from network byte order to host byte order */
| 1065 | * converts a 64-bit integer from network byte order to host byte order |
| 1066 | */ |
| 1067 | static pg_int64 |
| 1068 | lo_ntoh64(pg_int64 net64) |
| 1069 | { |
| 1070 | union |
| 1071 | { |
| 1072 | pg_int64 i64; |
| 1073 | uint32 i32[2]; |
| 1074 | } swap; |
| 1075 | pg_int64 result; |
| 1076 | |
| 1077 | swap.i64 = net64; |
| 1078 | |
| 1079 | result = (uint32) pg_ntoh32(swap.i32[0]); |
| 1080 | result <<= 32; |
| 1081 | result |= (uint32) pg_ntoh32(swap.i32[1]); |
| 1082 | |
| 1083 | return result; |
| 1084 | } |
no outgoing calls
no test coverage detected