[pisa-src] Re: r1661 - trunk/pisabeacon/beaconmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Thu, 12 Nov 2009 14:21:29 +0100

On Thu, Nov 12, 2009 at 02:15:43PM +0100, Diego Biurrun wrote:
> > -static void plb_quit(int quitcode) {
> > +static void plb_quit(UNUSED int quitcode) {
> >     printf("Quitting PISA location server daemon...\n");
> >     exit(EXIT_SUCCESS);
> >  }
> 
> Why not drop the function argument if it is unused?  Seems more sensible
> to me...

This function is used as a callback for signal:

typedef void (*sighandler_t)(int);
sighandler_t signal(int signum, sighandler_t handler);

For other cases than callbacks with a defined type I'd agree.

-- 
Thomas Jansen, "Mithi" --- mithi@xxxxxxxxx
GPG 9D5C682B, feel free to sign or encrypt your mail

Other related posts: