Skip to content

Commit

Permalink
Run clang-format on C files
Browse files Browse the repository at this point in the history
  • Loading branch information
Uelb committed Mar 21, 2024
1 parent 03bcef7 commit 773d474
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ext/ox/ox.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct _pInfo {
VALUE *marked;
int mark_size; // allocated size
int mark_cnt;
char last; // last character read, rarely set
char last; // last character read, rarely set
};

extern VALUE ox_parse(char *xml, size_t len, ParseCallbacks pcb, char **endp, Options options, Err err);
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ ox_parse(char *xml, size_t len, ParseCallbacks pcb, char **endp, Options options
helper_stack_cleanup(&pi.helpers);
return Qnil;
}
pi.s++; // past <
pi.s++; // past <
switch (*pi.s) {
case '?': // processing instruction
pi.s++;
Expand Down
2 changes: 1 addition & 1 deletion ext/ox/sax_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int ox_sax_buf_read(Buf buf) {
} else {
shift = buf->pro - buf->head - 1; // leave one character so we cab backup one
}
if (0 >= shift) { /* no space left so allocate more */
if (0 >= shift) { /* no space left so allocate more */
char *old = buf->head;
size_t size = buf->end - buf->head + BUF_PAD;

Expand Down
4 changes: 2 additions & 2 deletions ext/ox/slotcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ slot_cache_get(SlotCache cache, const char *key, VALUE **slot, const char **keyp
orig->key = form_key(key);
orig->value = Qundef;
}
} else { /* not exact match but on the path */
if (0 != cache->key) { /* there is a key/value here already */
} else { /* not exact match but on the path */
if (0 != cache->key) { /* there is a key/value here already */
if (depth == *cache->key || (255 <= depth && 0 == strncmp(cache->key, key, depth) &&
'\0' == cache->key[depth])) { /* key belongs here */
continue;
Expand Down

0 comments on commit 773d474

Please sign in to comment.