kconfig: split the lexer out of zconf.y
[carl9170fw.git] / tools / src / checksum.c
index 7d1ae35dac906eeb33e2a0e0282185c8e13361dd..b39417494b8cc2b4eb7a5b82c98aad47099d4f85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010, Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2010-2011 Christian Lamparter <chunkeey@googlemail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -54,8 +54,9 @@ int main(int argc, char *args[])
 
        fw = carlfw_load(args[1]);
        if (IS_ERR_OR_NULL(fw)) {
+               err = PTR_ERR(fw);
                fprintf(stderr, "Failed to open file \"%s\" (%d).\n",
-                       args[1], (int) PTR_ERR(fw));
+                       args[1], err);
                goto out;
        }