From 19e29ad6f256d80bfdd7e4b824eada603a00e49a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sat, 28 May 2016 23:44:42 +0200 Subject: indent with tabs --- bin/ykfde-cpio.c | 2 +- bin/ykfde.c | 2 +- udev/ykfde.c | 30 +++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/ykfde-cpio.c b/bin/ykfde-cpio.c index 371198e..c4a9d92 100644 --- a/bin/ykfde-cpio.c +++ b/bin/ykfde-cpio.c @@ -118,7 +118,7 @@ int main(int argc, char **argv) { goto out10; } - while (1) { + while (1) { path = strdup(CHALLENGEDIR + 1); if (strstr(path + pathlength, "/") == NULL) break; diff --git a/bin/ykfde.c b/bin/ykfde.c index 05a96b3..209d5ce 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -320,7 +320,7 @@ int main(int argc, char **argv) { * We expect this to be active (or busy). It is the actual root device, no? */ cryptstatus = crypt_status(cryptdevice, device_name); if (cryptstatus != CRYPT_ACTIVE && cryptstatus != CRYPT_BUSY) { - fprintf(stderr, "Device %s is invalid or inactive.\n", device_name); + fprintf(stderr, "Device %s is invalid or inactive.\n", device_name); goto out50; } diff --git a/udev/ykfde.c b/udev/ykfde.c index c95237d..af08104 100644 --- a/udev/ykfde.c +++ b/udev/ykfde.c @@ -60,21 +60,21 @@ void received_signal(int signal) { } static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) { - union { - struct sockaddr sa; - struct sockaddr_un un; - } sa = { - .un.sun_family = AF_UNIX, - }; - - strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path)); - - if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) { - perror("sendto() failed"); - return EXIT_FAILURE; - } + union { + struct sockaddr sa; + struct sockaddr_un un; + } sa = { + .un.sun_family = AF_UNIX, + }; + + strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path)); + + if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) { + perror("sendto() failed"); + return EXIT_FAILURE; + } - return EXIT_SUCCESS; + return EXIT_SUCCESS; } static int try_answer(YK_KEY * yk, uint8_t slot, const char * ask_file, char * challenge) { @@ -192,7 +192,7 @@ int main(int argc, char **argv) { /* read challenge */ char challenge[CHALLENGELEN + 1]; char challengefilename[sizeof(CHALLENGEDIR) + 11 /* "/challenge-" */ + 10 /* unsigned int in char */ + 1]; - int challengefile; + int challengefile; /* read dir */ DIR * dir; struct dirent * ent; -- cgit v1.2.3-54-g00ecf