Re: [systemd-devel] [PATCH] consistently order cleanup attribute before type

2014-06-21 Thread Tom Gundersen
Applied. Thanks!

-t

On Sat, Jun 21, 2014 at 5:55 AM, Thomas H.P. Andersen pho...@gmail.com wrote:
 From: Thomas Hindoe Paaboel Andersen pho...@gmail.com

 ---
  src/cgls/cgls.c| 2 +-
  src/journal/journal-remote-parse.c | 4 ++--
  src/journal/journal-remote.c   | 8 
  src/journal/microhttpd-util.c  | 2 +-
  src/nspawn/nspawn.c| 2 +-
  src/readahead/readahead-common.c   | 2 +-
  src/shared/fileio.c| 2 +-
  src/shared/sleep-config.c  | 2 +-
  src/shared/socket-label.c  | 2 +-
  src/test/test-path-util.c  | 2 +-
  10 files changed, 14 insertions(+), 14 deletions(-)

 diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
 index bec9b59..052ac8f 100644
 --- a/src/cgls/cgls.c
 +++ b/src/cgls/cgls.c
 @@ -130,7 +130,7 @@ static int parse_argv(int argc, char *argv[]) {
  int main(int argc, char *argv[]) {
  int r = 0, retval = EXIT_FAILURE;
  int output_flags;
 -char _cleanup_free_ *root = NULL;
 +_cleanup_free_ char *root = NULL;
  _cleanup_bus_unref_ sd_bus *bus = NULL;

  log_parse_environment();
 diff --git a/src/journal/journal-remote-parse.c 
 b/src/journal/journal-remote-parse.c
 index 239ff38..dbdf02a 100644
 --- a/src/journal/journal-remote-parse.c
 +++ b/src/journal/journal-remote-parse.c
 @@ -177,7 +177,7 @@ static int fill_fixed_size(RemoteSource *source, void 
 **data, size_t size) {

  static int get_data_size(RemoteSource *source) {
  int r;
 -void _cleanup_free_ *data = NULL;
 +_cleanup_free_ void *data = NULL;

  assert(source);
  assert(source-state == STATE_DATA_START);
 @@ -215,7 +215,7 @@ static int get_data_data(RemoteSource *source, void 
 **data) {

  static int get_data_newline(RemoteSource *source) {
  int r;
 -char _cleanup_free_ *data = NULL;
 +_cleanup_free_ char *data = NULL;

  assert(source);
  assert(source-state == STATE_DATA_FINISH);
 diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c
 index 31401fb..a31dc2c 100644
 --- a/src/journal/journal-remote.c
 +++ b/src/journal/journal-remote.c
 @@ -139,7 +139,7 @@ static int spawn_curl(char* url) {

  static int spawn_getter(char *getter, char *url) {
  int r;
 -char _cleanup_strv_free_ **words = NULL;
 +_cleanup_strv_free_ char **words = NULL;

  assert(getter);
  words = strv_split_quoted(getter);
 @@ -154,7 +154,7 @@ static int spawn_getter(char *getter, char *url) {
  }

  static int open_output(Writer *s, const char* url) {
 -char _cleanup_free_ *name, *output = NULL;
 +_cleanup_free_ char *name, *output = NULL;
  char *c;
  int r;

 @@ -745,8 +745,8 @@ static int remoteserver_init(RemoteServer *s) {
  }

  if (arg_url) {
 -char _cleanup_free_ *url = NULL;
 -char _cleanup_strv_free_ **urlv = strv_new(arg_url, 
 /entries, NULL);
 +_cleanup_free_ char *url = NULL;
 +_cleanup_strv_free_ char **urlv = strv_new(arg_url, 
 /entries, NULL);
  if (!urlv)
  return log_oom();
  url = strv_join(urlv, );
 diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c
 index 9a8d5c6..007cb5d 100644
 --- a/src/journal/microhttpd-util.c
 +++ b/src/journal/microhttpd-util.c
 @@ -217,7 +217,7 @@ int check_permissions(struct MHD_Connection *connection, 
 int *code) {
  const union MHD_ConnectionInfo *ci;
  gnutls_session_t session;
  gnutls_x509_crt_t client_cert;
 -char _cleanup_free_ *buf = NULL;
 +_cleanup_free_ char *buf = NULL;
  int r;

  assert(connection);
 diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
 index 8270348..212f722 100644
 --- a/src/nspawn/nspawn.c
 +++ b/src/nspawn/nspawn.c
 @@ -824,7 +824,7 @@ static int setup_timezone(const char *dest) {
  }

  static int setup_resolv_conf(const char *dest) {
 -char _cleanup_free_ *where = NULL;
 +_cleanup_free_ char *where = NULL;

  assert(dest);

 diff --git a/src/readahead/readahead-common.c 
 b/src/readahead/readahead-common.c
 index 890886e..eda99e8 100644
 --- a/src/readahead/readahead-common.c
 +++ b/src/readahead/readahead-common.c
 @@ -226,7 +226,7 @@ int open_inotify(void) {
  }

  ReadaheadShared *shared_get(void) {
 -int _cleanup_close_ fd = -1;
 +_cleanup_close_ int fd = -1;
  ReadaheadShared *m = NULL;

  mkdirs();
 diff --git a/src/shared/fileio.c b/src/shared/fileio.c
 index c7b2cd8..c580624 100644
 --- a/src/shared/fileio.c
 +++ b/src/shared/fileio.c
 @@ -708,7 +708,7 @@ int write_env_file(const char *fname, char **l) {

  int executable_is_script(const char *path, char **interpreter) {
  int r;
 -char _cleanup_free_ *line = NULL;
 +_cleanup_free_ char *line = NULL;
  int len;
   

[systemd-devel] [PATCH] consistently order cleanup attribute before type

2014-06-20 Thread Thomas H.P. Andersen
From: Thomas Hindoe Paaboel Andersen pho...@gmail.com

---
 src/cgls/cgls.c| 2 +-
 src/journal/journal-remote-parse.c | 4 ++--
 src/journal/journal-remote.c   | 8 
 src/journal/microhttpd-util.c  | 2 +-
 src/nspawn/nspawn.c| 2 +-
 src/readahead/readahead-common.c   | 2 +-
 src/shared/fileio.c| 2 +-
 src/shared/sleep-config.c  | 2 +-
 src/shared/socket-label.c  | 2 +-
 src/test/test-path-util.c  | 2 +-
 10 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index bec9b59..052ac8f 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -130,7 +130,7 @@ static int parse_argv(int argc, char *argv[]) {
 int main(int argc, char *argv[]) {
 int r = 0, retval = EXIT_FAILURE;
 int output_flags;
-char _cleanup_free_ *root = NULL;
+_cleanup_free_ char *root = NULL;
 _cleanup_bus_unref_ sd_bus *bus = NULL;
 
 log_parse_environment();
diff --git a/src/journal/journal-remote-parse.c 
b/src/journal/journal-remote-parse.c
index 239ff38..dbdf02a 100644
--- a/src/journal/journal-remote-parse.c
+++ b/src/journal/journal-remote-parse.c
@@ -177,7 +177,7 @@ static int fill_fixed_size(RemoteSource *source, void 
**data, size_t size) {
 
 static int get_data_size(RemoteSource *source) {
 int r;
-void _cleanup_free_ *data = NULL;
+_cleanup_free_ void *data = NULL;
 
 assert(source);
 assert(source-state == STATE_DATA_START);
@@ -215,7 +215,7 @@ static int get_data_data(RemoteSource *source, void **data) 
{
 
 static int get_data_newline(RemoteSource *source) {
 int r;
-char _cleanup_free_ *data = NULL;
+_cleanup_free_ char *data = NULL;
 
 assert(source);
 assert(source-state == STATE_DATA_FINISH);
diff --git a/src/journal/journal-remote.c b/src/journal/journal-remote.c
index 31401fb..a31dc2c 100644
--- a/src/journal/journal-remote.c
+++ b/src/journal/journal-remote.c
@@ -139,7 +139,7 @@ static int spawn_curl(char* url) {
 
 static int spawn_getter(char *getter, char *url) {
 int r;
-char _cleanup_strv_free_ **words = NULL;
+_cleanup_strv_free_ char **words = NULL;
 
 assert(getter);
 words = strv_split_quoted(getter);
@@ -154,7 +154,7 @@ static int spawn_getter(char *getter, char *url) {
 }
 
 static int open_output(Writer *s, const char* url) {
-char _cleanup_free_ *name, *output = NULL;
+_cleanup_free_ char *name, *output = NULL;
 char *c;
 int r;
 
@@ -745,8 +745,8 @@ static int remoteserver_init(RemoteServer *s) {
 }
 
 if (arg_url) {
-char _cleanup_free_ *url = NULL;
-char _cleanup_strv_free_ **urlv = strv_new(arg_url, 
/entries, NULL);
+_cleanup_free_ char *url = NULL;
+_cleanup_strv_free_ char **urlv = strv_new(arg_url, 
/entries, NULL);
 if (!urlv)
 return log_oom();
 url = strv_join(urlv, );
diff --git a/src/journal/microhttpd-util.c b/src/journal/microhttpd-util.c
index 9a8d5c6..007cb5d 100644
--- a/src/journal/microhttpd-util.c
+++ b/src/journal/microhttpd-util.c
@@ -217,7 +217,7 @@ int check_permissions(struct MHD_Connection *connection, 
int *code) {
 const union MHD_ConnectionInfo *ci;
 gnutls_session_t session;
 gnutls_x509_crt_t client_cert;
-char _cleanup_free_ *buf = NULL;
+_cleanup_free_ char *buf = NULL;
 int r;
 
 assert(connection);
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 8270348..212f722 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -824,7 +824,7 @@ static int setup_timezone(const char *dest) {
 }
 
 static int setup_resolv_conf(const char *dest) {
-char _cleanup_free_ *where = NULL;
+_cleanup_free_ char *where = NULL;
 
 assert(dest);
 
diff --git a/src/readahead/readahead-common.c b/src/readahead/readahead-common.c
index 890886e..eda99e8 100644
--- a/src/readahead/readahead-common.c
+++ b/src/readahead/readahead-common.c
@@ -226,7 +226,7 @@ int open_inotify(void) {
 }
 
 ReadaheadShared *shared_get(void) {
-int _cleanup_close_ fd = -1;
+_cleanup_close_ int fd = -1;
 ReadaheadShared *m = NULL;
 
 mkdirs();
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index c7b2cd8..c580624 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -708,7 +708,7 @@ int write_env_file(const char *fname, char **l) {
 
 int executable_is_script(const char *path, char **interpreter) {
 int r;
-char _cleanup_free_ *line = NULL;
+_cleanup_free_ char *line = NULL;
 int len;
 char *ans;
 
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 1972cdb..867e4ed 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -49,7 +49,7 @@ int