Update ldattach.c

Fixed incorrect variable type