MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / update

Method update

libapp2sys/src/main/cpp/procutil.h:112–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110 }
111
112 char* update() {
113 if (!m_szPath) {
114 return NULL;
115 }
116
117 if (!fd) {
118 fd = open(m_szPath, O_RDONLY);
119 } else {
120 lseek(fd, 0, SEEK_SET);
121 }
122
123 if (fd < 0) {
124 fd = 0;
125 return NULL;
126 }
127
128 int ret = read(fd, line, MAX_LEN);
129 if (ret <= 0) {
130 close(fd);
131 fd = 0;
132 }
133 line[ret] = '\0';
134 return line;
135 }
136
137 int64_t getValue(uint32_t index) {
138 char *ptr = line;

Callers 2

runMethod · 0.45
startMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected