0

I have the following function with me and when i compile my entire file it gives me a certain error:

Function:

static boolean
2388 e1000_phys_port (pic_t *pic, e1000_t *e1000)
2389 {
2390         pic->pic_flags = 0;
2391 
2392         switch (pic->pic_id) {
2393         case I2C_ID_VSERIES_GIGE_PIC:
2394                 e1000->e1000_port_count = fwdd_vjx_get_e1000_ports();
2395                 break;
2396         default:
2397                 syslog(LOG_ERR, "%s: unknown I2C ID\n", e1000->pic_name);
2398                 return(FALSE);
2399         }
2400 
2401         return(TRUE);  
2402 }

Error:

2388: error:expected '=', ',', ';', 'asm' or '__attribute__' before e1000_phys_port

If anyone could resolve this for me asap!

1 Answers1

0

boolean is not a type in C. (Unless you typedef'ed it somewhere yourself) – Russell Zahniser

What @RussellZahniser means is that there's no type named boolean in C, unless it was defined using typedef (or #define), for example typedef int boolean;. – caspase

You should #include <stdbool.h> and use the return type bool, if you can. – Klas Lindbäck

Community
  • 1
  • 1
Armali
  • 18,255
  • 14
  • 57
  • 171