chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update release notes for next version
[elogind.git]
/
extras
/
ata_id
/
ata_id.c
diff --git
a/extras/ata_id/ata_id.c
b/extras/ata_id/ata_id.c
index 1e99b9df9c6129e8e81490af2d10dd7038bc1795..2840e914579c4118a0d6941ec91bd1c8522bae9a 100644
(file)
--- a/
extras/ata_id/ata_id.c
+++ b/
extras/ata_id/ata_id.c
@@
-62,10
+62,9
@@
void log_message(int priority, const char *format, ...)
}
#endif
}
#endif
-static void set_str(char *to, const
unsigned char *from, in
t count)
+static void set_str(char *to, const
char *from, size_
t count)
{
{
- int i, j;
- int len;
+ size_t i, j, len;
/* strip trailing whitespace */
len = strnlen(from, count);
/* strip trailing whitespace */
len = strnlen(from, count);
@@
-139,9
+138,9
@@
int main(int argc, char *argv[])
goto close;
}
goto close;
}
- set_str(model, id.model, 40);
- set_str(serial, id.serial_no, 20);
- set_str(revision, id.fw_rev, 8);
+ set_str(model,
(char *)
id.model, 40);
+ set_str(serial,
(char *)
id.serial_no, 20);
+ set_str(revision,
(char *)
id.fw_rev, 8);
if (export) {
if ((id.config >> 8) & 0x80) {
if (export) {
if ((id.config >> 8) & 0x80) {