On Mon, May 04, 2015 at 11:11:21AM +0300, Vadim Kochan wrote:
> From: Vadim Kochan <vadi...@gmail.com>
> 
> Rename xxx_panic_func(s) to xxx_panic_handler(s)
> which is more understandable than 'func'.
> 
> Signed-off-by: Vadim Kochan <vadi...@gmail.com>
> ---
>  die.c         | 4 ++--
>  die.h         | 8 ++++----
>  netsniff-ng.c | 2 +-
>  trafgen.c     | 2 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/die.c b/die.c
> index 523107e..4e525f9 100644
> --- a/die.c
> +++ b/die.c
> @@ -14,7 +14,7 @@ struct panic_handler {
>  
>  static struct panic_handler *panic_handlers;
>  
> -void panic_func_add(void (*on_panic)(void *arg), void *arg)
> +void panic_handler_add(void (*on_panic)(void *arg), void *arg)
>  {
>       struct panic_handler *handler = xmallocz(sizeof(*handler));
>  
> @@ -26,7 +26,7 @@ void panic_func_add(void (*on_panic)(void *arg), void *arg)
>       panic_handlers          = handler;
>  };
>  
> -void call_on_panic_funcs(void)
> +void call_panic_handlers(void)
>  {
>       struct panic_handler *it;
>       pid_t pid = getpid();
> diff --git a/die.h b/die.h
> index 0d709d0..0ca9e86 100644
> --- a/die.h
> +++ b/die.h
> @@ -12,8 +12,8 @@
>  
>  #include "built_in.h"
>  
> -extern void panic_func_add(void (*on_panic)(void *arg), void *arg);
> -extern void call_on_panic_funcs(void);
> +extern void panic_handler_add(void (*on_panic)(void *arg), void *arg);
> +extern void call_panic_handlers(void);
>  
>  static inline void panic(const char *format, ...)  __check_format_printf(1, 
> 2);
>  static inline void syslog_panic(const char *format,
> @@ -23,13 +23,13 @@ static inline void syslog_maybe(bool cond, int priority,
>  
>  static inline void __noreturn __die_hard(void)
>  {
> -     call_on_panic_funcs();
> +     call_panic_handlers();
>       exit(EXIT_FAILURE);
>  }
>  
>  static inline void __noreturn __die_harder(void)
>  {
> -     call_on_panic_funcs();
> +     call_panic_handlers();
>       _exit(EXIT_FAILURE);
>  }
>  
> diff --git a/netsniff-ng.c b/netsniff-ng.c
> index 9655c59..dfab81a 100644
> --- a/netsniff-ng.c
> +++ b/netsniff-ng.c
> @@ -198,7 +198,7 @@ static inline void setup_rfmon_mac80211_dev(struct ctx 
> *ctx, char **rfmon_dev)
>       xfree(*rfmon_dev);
>  
>       enter_rfmon_mac80211(ctx->device_trans, rfmon_dev);
> -     panic_func_add(on_panic_del_rfmon, *rfmon_dev);
> +     panic_handler_add(on_panic_del_rfmon, *rfmon_dev);
>  }
>  
>  static void pcap_to_xmit(struct ctx *ctx)
> diff --git a/trafgen.c b/trafgen.c
> index 4a9fde5..f981eaf 100644
> --- a/trafgen.c
> +++ b/trafgen.c
> @@ -1072,7 +1072,7 @@ int main(int argc, char **argv)
>               xfree(ctx.device);
>  
>               enter_rfmon_mac80211(ctx.device_trans, &ctx.device);
> -             panic_func_add(on_panic_del_rfmon, ctx.device);
> +             panic_handler_add(on_panic_del_rfmon, ctx.device);
>               sleep(0);
>       }
>  
> -- 
> 2.3.1
> 

'make clean && make' is needed after these changes ...

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to