From: Francois Fleuret Date: Fri, 13 Aug 2010 15:07:32 +0000 (+0200) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=1963a3e9d47673eb126ca00c2679018448c3e196;p=dus.git Cosmetics. --- diff --git a/dus.c b/dus.c index 336f201..2947b5a 100644 --- a/dus.c +++ b/dus.c @@ -73,7 +73,9 @@ size_sum_t size_min = -1; /* -1 means no minimum size, otherwise lower void *safe_malloc(size_t n) { void *p = malloc(n); if (!p && n != 0) { - fprintf(stderr, "dus: Can not allocate memory: %s\n", strerror(errno)); + fprintf(stderr, + "dus: Can not allocate memory: %s\n", + strerror(errno)); exit(EXIT_FAILURE); } return p; @@ -98,7 +100,9 @@ size_sum_t entry_size(const char *name) { result = 0; if(lstat(name, &dummy) != 0) { - fprintf(stderr, "dus: Can not stat %s: %s\n", name, strerror(errno)); + fprintf(stderr, + "dus: Can not stat %s: %s\n", + name, strerror(errno)); exit(EXIT_FAILURE); } @@ -117,7 +121,9 @@ size_sum_t entry_size(const char *name) { } closedir(dir); } else { - fprintf(stderr, "dus: Can not open directory %s: %s\n", name, strerror(errno)); + fprintf(stderr, + "dus: Can not open directory %s: %s\n", + name, strerror(errno)); exit(EXIT_FAILURE); } } else if(S_ISREG(dummy.st_mode)) { @@ -149,7 +155,9 @@ size_sum_t atoss(const char *string) { total += partial_total * 1024 * 1024 * 1024; partial_total = 0; } else { - fprintf(stderr, "dus: Syntax error in size specification `%s'\n", string); + fprintf(stderr, + "dus: Syntax error in size specification `%s'\n", + string); exit(EXIT_FAILURE); } } @@ -190,7 +198,9 @@ struct entry_node *push_dir_content(char *name, struct entry_node *head) { } closedir(dir); } else { - fprintf(stderr, "dus: Can not open directory %s: %s\n", name, strerror(errno)); + fprintf(stderr, + "dus: Can not open directory %s: %s\n", + name, strerror(errno)); exit (EXIT_FAILURE); } return head; @@ -240,7 +250,8 @@ void raw_print(char *buffer, size_t buffer_size, b = buffer; do { if(b >= buffer + buffer_size) { - fprintf(stderr, "dus: Buffer overflow in raw_print (hu?!).\n"); + fprintf(stderr, + "dus: Buffer overflow in raw_print (hu?!).\n"); exit(EXIT_FAILURE); } *(b++) = size%10 + '0';