am I updating after and room correctly?
#define BUFSIZE 30

int find_network_newline(const char *buf, int n);

int main() {
    // This line causes stdout not to be buffered.
    // Don't change this! Necessary for autotesting.
    setbuf(stdout, NULL);

    struct sockaddr_in *self = init_server_addr(PORT);
    int listenfd = set_up_server_socket(self, 5);

    while (1) {
        int fd = accept_connection(listenfd);
        if (fd < 0) {
            continue;
        }

        // Receive messages
        char buf[BUFSIZE] = {'\0'};
        int inbuf = 0;           // How many bytes currently in buffer?
        int room = sizeof(buf);  // How many bytes remaining in buffer?
        char *after = buf;       // Pointer to position after the data in buf

        int nbytes;
        while ((nbytes = read(fd, after, room)) > 0) {
            inbuf += nbytes;

            int where;

            while ((where = find_network_newline(buf, inbuf)) > 0) {
                buf[where - 1] = '\0';

                printf("Next message: %s\n", buf);

                int number_of_bytes = inbuf - (where + 1);

                char move_this[number_of_bytes];

                memmove(buf, &buf[where + 1], number_of_bytes);

                inbuf = number_of_bytes;
            }
            // Step 5: update after and room, in preparation for the next read.
            after = buf[strlen(buf) - inbuf];
            room = strlen(buf) - inbuf;
        }