grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unnecessary parameter in grub_term_register_{input,output} ()


From: Robert Millan
Subject: unnecessary parameter in grub_term_register_{input,output} ()
Date: Sat, 19 Sep 2009 23:39:48 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Maybe there's some subtle detail I'm missing, but it seems to me that it's
completely pointless to pass the `name' parameter in all calls to these
two functions:

 static inline void
 grub_term_register_input (const char *name __attribute__ ((unused)),
                          grub_term_input_t term)
 {
   grub_handler_register (&grub_term_input_class, GRUB_AS_HANDLER (term));
 }
 
 static inline void
 grub_term_register_output (const char *name __attribute__ ((unused)),
                           grub_term_output_t term)
 {
   grub_handler_register (&grub_term_output_class, GRUB_AS_HANDLER (term));
 }

Such as:

  void
  grub_console_init (void)
  {
    grub_term_register_output ("console", &grub_console_term_output);
    grub_term_register_input ("console", &grub_console_term_input);
  }

Since we don't use it, and the same information is in term->name anyway.

Does anyone see a reason not to simplify this?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]