]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
rust: misc rustification
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 8 Mar 2023 13:40:41 +0000 (19:10 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 8 Mar 2023 13:40:41 +0000 (19:10 +0530)
hpsdrsim.c
rust/Cargo.toml

index cbcc943cc55e07625d3705dd99b57235eb7ce87a..5ff85bb93fd8ee69a853208f732f1669ca3d33b4 100644 (file)
@@ -518,7 +518,7 @@ int main(int argc, char *argv[])
                        udp_retries=0;
                }
                if (bytes_read <= 0) continue;
-                       memcpy(&code, buffer, 4);
+                memcpy(&code, buffer, 4);
 
                        switch (code)
                        {
index 0060b33b5c0cf4b1aba0fd88bf8f685fd1339539..453e46ac5d7e888c1fee2a54c5065c8244e5345e 100644 (file)
@@ -7,10 +7,14 @@ authors = ["Ramakrishnan Muthukrishnan <ram@rkrishnan.org>"]
 [dependencies]
 libc = "0.2"
 cbindgen = "0.24.3"
+binary-layout = "3.1.3"
 
 [lib]
 name = "hpsdr"
 crate-type = ["staticlib"]
 
+[[bin]]
+name = "hpsdrsim-rs"
+path = "cmd/hpsdrsim.rs"
 [build-dependencies]
 cbindgen = "0.20.0"