mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-30 08:50:25 +08:00
优化代码结构
This commit is contained in:
@@ -24,7 +24,7 @@ add_executable(cfgwriter cfgwriter.c)
|
|||||||
#add_executable(migratenew migratenew.c)
|
#add_executable(migratenew migratenew.c)
|
||||||
|
|
||||||
target_link_libraries(simple-dict-server scrypto libspb.a pthread)
|
target_link_libraries(simple-dict-server scrypto libspb.a pthread)
|
||||||
target_link_libraries(simple-dict-client scrypto pthread)
|
target_link_libraries(simple-dict-client scrypto libspb.a pthread)
|
||||||
target_link_libraries(cfgwriter libspb.a)
|
target_link_libraries(cfgwriter libspb.a)
|
||||||
|
|
||||||
#target_link_libraries(migrate libspb.a)
|
#target_link_libraries(migrate libspb.a)
|
||||||
|
|||||||
1
client.c
1
client.c
@@ -150,7 +150,6 @@ int main(int argc, char *argv[]) { // usage: ./client cfg.sp host port
|
|||||||
perror("fopen");
|
perror("fopen");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
uint8_t buf[8+sizeof(config_t)];
|
|
||||||
SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf);
|
SIMPLE_PB* spb = read_pb_into(fp, (SIMPLE_PB*)buf);
|
||||||
if(!spb) {
|
if(!spb) {
|
||||||
fprintf(stderr, "Error reading config file: %s\n", argv[1]);
|
fprintf(stderr, "Error reading config file: %s\n", argv[1]);
|
||||||
|
|||||||
Reference in New Issue
Block a user