Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/mfoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ int main(int argc, char *const argv[])
exit(EXIT_FAILURE);
}

void usage(FILE *stream, int errno)
void usage(FILE *stream, int code)
{
fprintf(stream, "Usage: mfoc [-h] [-k key] [-f file] ... [-P probnum] [-T tolerance] [-O output]\n");
fprintf(stream, "\n");
Expand All @@ -776,7 +776,7 @@ void usage(FILE *stream, int errno)
fprintf(stream, "\n");
fprintf(stream, "This is mfoc version %s.\n", PACKAGE_VERSION);
fprintf(stream, "For more information, run: 'man mfoc'.\n");
exit(errno);
exit(code);
}

void mf_init(mfreader *r)
Expand Down
2 changes: 1 addition & 1 deletion src/mfoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef struct {
} countKeys;


void usage(FILE *stream, int errno);
void usage(FILE *stream, int code);
void mf_init(mfreader *r);
void mf_configure(nfc_device *pdi);
void mf_select_tag(nfc_device *pdi, nfc_target *pnt);
Expand Down
3 changes: 2 additions & 1 deletion src/nfc-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -45,7 +46,7 @@ uint8_t
oddparity(const uint8_t bt)
{
// cf http://graphics.stanford.edu/~seander/bithacks.html#ParityParallel
return (0x9669 >> ((bt ^(bt >> 4)) & 0xF)) & 1;
return (0x9669 >> ((bt ^ (bt >> 4)) & 0xF)) & 1;
}

void
Expand Down
1 change: 1 addition & 0 deletions src/nfc-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
* Additional contributors of this file:
*
* Redistribution and use in source and binary forms, with or without
Expand Down