fix 32/64 bit error using LONG_MAX
fix 32/64 bit error using LONG_MAX

ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead