Besides bony changes which would show up on xray (eg ankylosing spondylitis of lumbar spine), nothing else comes to mind that would cause a straightening of a normal lordotic curve of the cervical spine. Muscle spasms certainly would cause this. All this means is the neck muscles are keeping the neck stiff to prevent painful movement. There is probably a strain or sprain in the neck area causing the symtoms. Usually time, rest, heat, OTC analgesics, and gradual gentle range of motion resolves the condition. If you develop numbness, tingling, or weakness in either arm consult your physician because this may mean nerve tissue is being pinched or inflamed.
Keep us updated.